Can't override settings with environment variables in Django 1.5
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
django-configglue |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
In Django 1.5 the code which monkey-patches django.
Because of that schemaconfigglue, which uses shell environment for options, is never run, and there's no way for overriding settings that way.
To fix it temporarily, one have to import django_
Proper fix will probably require moving the monkey-patching code to a module which is run before Django gets to execute code from its django.
Related branches
- Ricardo Kirkner: Approve
- Matias Bordese (community): Approve
-
Diff: 150 lines (+43/-15)3 files modifieddjango_configglue/management/__init__.py (+11/-8)
django_configglue/tests/test_configglue.py (+27/-3)
django_configglue/tests/test_settings.py (+5/-4)
The better fix is to make this explicit and to avoid any magic monkeypatching.
In the manage.py command, replace
from django. core.management import execute_ from_command_ line
for
from django_ configglue. management import execute_ from_command_ line