#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 , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
Note:
See TracTickets
for help on using tickets.
Pull Request Submitted. (#6970 )