Opened 10 years ago
Closed 10 years ago
#24326 closed Uncategorized (needsinfo)
Environment variables will work with mod_wsgi
Reported by: | Daniel Greenfeld | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Nick Coghlan asked me to open this issue on djangoproject in a cookiecutter-django (a popular Django project template) issue in early December.
According to Graham Dumpleton environment variables with Django on Apache will work. I have no suggestions to provide, no experience on the subject, no strong feelings on the subject, am merely providing reference points:
- Graham's treatise: https://gist.github.com/GrahamDumpleton/b380652b768e81a7f60c
- Related django-configurations issue: https://github.com/jezdez/django-configurations/issues/87
- Another related django-configurations issue: https://github.com/jezdez/django-configurations/issues/53
- Original issue opened on cookiecutter-django: https://github.com/pydanny/cookiecutter-django/issues/160
Note:
See TracTickets
for help on using tickets.
Hi Danny - I'm not clear what change in Django this ticket is requesting. Nowhere in our mod_wsgi docs do we say that "you can't use environment variables with mod_wsgi", or anything like that. In fact, we have a callout demonstrating how to set an environment variable (
DJANGO_SETTINGS_MODULE
, the most likely environment variable for people to want to set) in yourwsgi.py
file, using the exact same technique shown in Graham's gist.If there are any factual errors in that documentation, or something missing that really should be added, maybe you (or someone) can clarify what specific changes would be helpful? A pull request would be a great way to do that :)
In the meantime, I'm closing this needsinfo as there's no clear path for action.