global constants in a separate file other than settings.py in django? -
i expect define lot of constants in project.
don't want pollute settings.py them.
(as mentioned defining constants in django)
where/how define global constants in django other settings.py file?
django settings.py
place have constants defined. other option write own template context processor. have separate file define of constants , import them in settings file in way settings file not polluted:
settings.py
# other settings # ---------- try: form my_constants import * except importerror: pass
Comments
Post a Comment