mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-14 03:11:46 +00:00
Defend against MAIN_DOMAIN being unset in prod
This commit is contained in:
parent
1ffcd5e6d1
commit
3f3e815407
1 changed files with 3 additions and 0 deletions
|
@ -326,6 +326,9 @@ MEDIA_URL = SETUP.MEDIA_URL
|
|||
MEDIA_ROOT = SETUP.MEDIA_ROOT
|
||||
MAIN_DOMAIN = SETUP.MAIN_DOMAIN
|
||||
|
||||
if not DEBUG and MAIN_DOMAIN == "example.com":
|
||||
raise ValueError("You must set a TAKAHE_MAIN_DOMAIN!")
|
||||
|
||||
# Debug toolbar should only be loaded at all when debug is on
|
||||
if DEBUG and SETUP.DEBUG_TOOLBAR:
|
||||
INSTALLED_APPS.append("debug_toolbar")
|
||||
|
|
Loading…
Reference in a new issue