1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Added django/core/servers/fastcgi.py and manage.py 'runfcgi' option. Thanks, jcrasta@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-06-20 05:24:19 +00:00
parent a4b11826a7
commit 32228d2031
4 changed files with 212 additions and 0 deletions

View File

@@ -1081,6 +1081,12 @@ def dbshell():
runshell()
dbshell.args = ""
def runfcgi(args):
"""Run this project as a FastCGI application. requires flup."""
from django.core.servers.fastcgi import runfastcgi
runfastcgi(args)
runfcgi.args = '[various KEY=val options, use `runfcgi help` for help]'
# Utilities for command-line script
DEFAULT_ACTION_MAPPING = {
@@ -1091,6 +1097,7 @@ DEFAULT_ACTION_MAPPING = {
'inspectdb': inspectdb,
'install': install,
'reset': reset,
'runfcgi': runfcgi,
'runserver': runserver,
'shell': run_shell,
'sql': get_sql_create,
@@ -1210,6 +1217,8 @@ def execute_from_command_line(action_mapping=DEFAULT_ACTION_MAPPING, argv=None):
except ValueError:
addr, port = '', args[1]
action_mapping[action](addr, port)
elif action == 'runfcgi':
action_mapping[action](args[1:])
else:
from django.db import models
try: