Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2372 closed defect (fixed)

[patch] manage.py runfcgi seems to ignore LANGUAGE_CODE

Reported by: ludo@… Owned by: Adrian Holovaty
Component: Tools Version:
Severity: normal Keywords:
Cc: mir@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Running an app under apache+fcgi using manage.py FastCGI support, the LANGUAGE_CODE variable in settings is ignored and all translations are displayed using 'en-us'. The same settings file used with 'manage.py runserver' on the same system shows the correct translations.

Attachments (2)

management.py.diff (742 bytes) - added by ludo@… 10 years ago.
quick fix
3382-fcgi-translation.diff (643 bytes) - added by bahamut@… 10 years ago.
Activates translation when running as FCGI.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by mir@…

Cc: mir@… added

Changed 10 years ago by ludo@…

Attachment: management.py.diff added

quick fix

comment:2 Changed 10 years ago by ludo@…

Summary: manage.py runfcgi seems to ignore LAANGUAGE_CODE[patch] manage.py runfcgi seems to ignore LANGUAGE_CODE

Quick fix to management.py.

comment:3 Changed 10 years ago by bahamut@…

I'm attaching a revised patch which doesn't use absolute paths to a Django install.

Changed 10 years ago by bahamut@…

Attachment: 3382-fcgi-translation.diff added

Activates translation when running as FCGI.

comment:4 Changed 10 years ago by Adrian Holovaty

Thanks for the patch, but do you have any idea why this problem is happening in the first place? I'm hesitant to commit it without knowing exactly what it's fixing.

comment:5 Changed 10 years ago by ludo@…

Adrian, from what I could gather (I only started working with Django last week), using 'manage.py runfcgi' the language defined in settings.LANGUAGE_CODE is never activated, and as a result your app uses the default 'en-us' language. This is different from what happens in development using 'manage.py runserver'. It may be the desired effect, but it sure got me confused me when I deployed my first app.

comment:6 Changed 10 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [3569]) Fixed #2372 -- manage.py runfcgi no longer ignore LANGUAGE_CODE. Thanks, ludo@…

Note: See TracTickets for help on using tickets.
Back to Top