Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26941 closed Bug (fixed)

Remove quotes from uwsgi "env = LANG=…" configuration

Reported by: Denilson Figueiredo de Sá Owned by: Naved Khan
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

At the very end of https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/uwsgi/
There is this example line for uwsgi INI configuration:

env = LANG='en_US.UTF-8'

After trying to debug my configuration for hours, I found that line is incorrect. Those quotes should be removed. The correct line is:

env = LANG=en_US.UTF-8

How to reproduce it:

  • Ubuntu 16.04
  • Python 3.5.2
  • Django 1.9.8
  • uwsgi 2.0.12-debian

And add the following lines to the settings.py:

import locale
import os
print(os.getenv('LANG', None))
print(locale.getlocale(), locale.getdefaultlocale())
print(locale.getpreferredencoding())
print(sys.getfilesystemencoding())

The broken configuration prints:

'en_US.UTF-8'
(None, None) ("'en_US", "UTF-8'")
ANSI_X3.4-1968
ascii

The correct one prints:

en_US.UTF-8
('en_US', 'UTF-8') ('en_US', 'UTF-8')
UTF-8
utf-8

Change History (6)

comment:1 by Naved Khan, 8 years ago

Owner: changed from nobody to Naved Khan
Status: newassigned

comment:2 by Naved Khan, 8 years ago

Pull Request Submitted. (#6970 )

comment:3 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 9a5a789d:

Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in docs.

comment:4 by Tim Graham <timograham@…>, 8 years ago

In 7665a521:

[1.8.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in docs.

Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master

comment:5 by Tim Graham <timograham@…>, 8 years ago

In 3ee1751a:

[1.9.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in docs.

Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master

comment:6 by Tim Graham <timograham@…>, 8 years ago

In ec6b3cc6:

[1.10.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in docs.

Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master

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