Skip to content

Commit 20070d9

Browse files
Fixed django#2372 -- manage.py runfcgi no longer ignore LANGUAGE_CODE. Thanks, ludo@qix.it
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 9354cfb commit 20070d9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

django/core/management.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,14 @@ def dbshell():
11421142
dbshell.args = ""
11431143

11441144
def runfcgi(args):
1145-
"""Run this project as a FastCGI application. requires flup."""
1145+
"Runs this project as a FastCGI application. Requires flup."
1146+
from django.conf import settings
1147+
from django.utils import translation
1148+
# Activate the current language, because it won't get activated later.
1149+
try:
1150+
translation.activate(settings.LANGUAGE_CODE)
1151+
except AttributeError:
1152+
pass
11461153
from django.core.servers.fastcgi import runfastcgi
11471154
runfastcgi(args)
11481155
runfcgi.args = '[various KEY=val options, use `runfcgi help` for help]'

0 commit comments

Comments
 (0)