equal
deleted
inserted
replaced
|
1 from django.core.management.base import BaseCommand |
|
2 |
|
3 class Command(BaseCommand): |
|
4 help = "Runs this project as a FastCGI application. Requires flup." |
|
5 args = '[various KEY=val options, use `runfcgi help` for help]' |
|
6 |
|
7 def handle(self, *args, **options): |
|
8 from django.conf import settings |
|
9 from django.utils import translation |
|
10 # Activate the current language, because it won't get activated later. |
|
11 try: |
|
12 translation.activate(settings.LANGUAGE_CODE) |
|
13 except AttributeError: |
|
14 pass |
|
15 from django.core.servers.fastcgi import runfastcgi |
|
16 runfastcgi(args) |
|
17 |
|
18 def usage(self, subcommand): |
|
19 from django.core.servers.fastcgi import FASTCGI_HELP |
|
20 return FASTCGI_HELP |