#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------
Reporter: denilsonsa | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26941>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.10779cbbd72b1a99b9a4e15095475274%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.