mirror of
https://github.com/nsupdate-info/nsupdate.info.git
synced 2026-04-25 08:35:56 +03:00
[GH-ISSUE #106] handling settings #102
Labels
No labels
bug
bug
duplicate
easy
easy
enhancement
enhancement
invalid
needs help
pull-request
scalability
security
task
urgent
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nsupdate.info-nsupdate-info#102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ThomasWaldmann on GitHub (Dec 8, 2013).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/106
Originally assigned to: @ThomasWaldmann on GitHub.
how we currently deal with (django) settings(.py) seems a bit backwards, see there:
https://github.com/nsupdate-info/nsupdate.info/blob/master/nsupdate/settings.py
the way it currently is causes issues. e.g. today I was bitten by django-debug-toolbar relying on a setting defined in django's default settings, but it was not defined in nsupdate.settings. it was the reason that ddt just did not work, nor give an error msg. it started working after I added the setting to nsupdate.settings.
i think it should be like this:
nsupdate.settings:
from django.conf.global_settings import *
(override / add whatever we need)
(no .local_settings import at the end)
local_settings (which is located outside the repo!):
from nsupdate.settings import *
(override / add whatever we need locally)
@ThomasWaldmann commented on GitHub (Dec 8, 2013):
additional ideas:
make settings a package with base.py, prod.py, dev.py
import stuff that needs to be locally modified via env var / from a json file
@ThomasWaldmann commented on GitHub (Dec 8, 2013):
important
django internally / implicitly reads its own defaults and then overwrites the settings read from there with whatever settings the application uses.
thus: no star import needed to have django's defaults present. we just need to import what we need in our settings.py (e.g. to modify).
@ThomasWaldmann commented on GitHub (Dec 12, 2013):
remove local_settings import and improved docs
d17bdd8006@ThomasWaldmann commented on GitHub (Dec 14, 2013):
fixed by
cae77f53c9