Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2372 closed defect (fixed)

[patch] manage.py runfcgi seems to ignore LANGUAGE_CODE

Reported by: ludo@… Owned by: adrian
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@… 8 years ago.
quick fix
3382-fcgi-translation.diff (643 bytes) - added by bahamut@… 8 years ago.
Activates translation when running as FCGI.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by mir@…

  • Cc mir@… added

Changed 8 years ago by ludo@…

quick fix

comment:2 Changed 8 years ago by ludo@…

  • Summary changed from manage.py runfcgi seems to ignore LAANGUAGE_CODE to [patch] manage.py runfcgi seems to ignore LANGUAGE_CODE

Quick fix to management.py.

comment:3 Changed 8 years ago by bahamut@…

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

Changed 8 years ago by bahamut@…

Activates translation when running as FCGI.

comment:4 Changed 8 years ago by adrian

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 8 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 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.