diff options
author | 2018-08-31 23:25:18 +0200 | |
---|---|---|
committer | 2018-08-31 23:25:18 +0200 | |
commit | 1d1ffe6b0d924760e1e64cf6485f46572129b131 (patch) | |
tree | 65cd8b71bd7a18b44ea417c0cf6ed76a87a8754e /pysite | |
parent | Remove unused files. (diff) | |
parent | Install `flake8` on system. (diff) |
Merge branch 'django' into django+documentation-link-api
Diffstat (limited to 'pysite')
-rw-r--r-- | pysite/hosts.py | 8 | ||||
-rw-r--r-- | pysite/settings.py | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/pysite/hosts.py b/pysite/hosts.py index 827f49c3..67fc2451 100644 --- a/pysite/hosts.py +++ b/pysite/hosts.py @@ -4,10 +4,10 @@ from django_hosts import host, patterns host_patterns = patterns( '', # > | Subdomain | URL Module | Host entry name | - #host(r"admin", "admin", name="admin"), + # host(r"admin", "admin", name="admin"), host(r'api', 'api.urls', name='api'), - #host(r"staff", "staff", name="staff"), - #host(r"wiki", "wiki", name="wiki"), - #host(r"ws", "ws", name="ws"), + # host(r"staff", "staff", name="staff"), + # host(r"wiki", "wiki", name="wiki"), + # host(r"ws", "ws", name="ws"), host(r'.*', 'home.urls', name=settings.DEFAULT_HOST) ) diff --git a/pysite/settings.py b/pysite/settings.py index 3392426d..c7a21083 100644 --- a/pysite/settings.py +++ b/pysite/settings.py @@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os -import sys +# import sys import environ @@ -40,6 +40,11 @@ if DEBUG: 'wiki.pythondiscord.local' ] SECRET_KEY = "+_x00w3e94##2-qm-v(5&-x_@*l3t9zlir1etu+7$@4%!it2##" + +elif 'CI' in os.environ: + ALLOWED_HOSTS = ['*'] + SECRET_KEY = "{©ø¬½.Þ7&Ñ`Q^Kº*~¢j<wxß¾±ðÛJ@q" + else: ALLOWED_HOSTS = [ 'pythondiscord.com', @@ -175,6 +180,3 @@ REST_FRAMEWORK = { ), 'TEST_REQUEST_DEFAULT_FORMAT': 'json' } - -# Bot API settings -BOT_API_KEY = env('BOT_API_KEY') |