aboutsummaryrefslogtreecommitdiffstats
path: root/pysite
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-08-31 21:04:15 +0000
committerGravatar Johannes Christ <[email protected]>2018-08-31 21:04:15 +0000
commit52462b6fc5be74a6150530218ebe1b24e5e899e5 (patch)
tree8c6e0c238e25225fd55da0f99bb3aedcb9847aae /pysite
parentAdd a `Dockerfile`. (diff)
parentAlways upload cov reports, add pipenv cache. (diff)
Merge branch 'django+add-gitlab-ci' into 'django'
Django - Add GitLab CI. See merge request python-discord/projects/site!36
Diffstat (limited to 'pysite')
-rw-r--r--pysite/hosts.py8
-rw-r--r--pysite/settings.py10
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')