web/lib/django/core/management/commands/runfcgi.py
changeset 0 0d40e90630ef
equal deleted inserted replaced
-1:000000000000 0:0d40e90630ef
       
     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