From 37ff9fe6cdc6fff84ccda6c5d610a521288d99ce Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 30 Aug 2018 20:02:09 +0200 Subject: Proeprly set up lint and test stages. --- pysite/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pysite/settings.py') diff --git a/pysite/settings.py b/pysite/settings.py index 3392426d..16235e09 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 -- cgit v1.2.3 From 5087d128637f70e10879d1d9c3f8f7fd4673cc39 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 30 Aug 2018 20:14:45 +0200 Subject: Properly configure Django project. --- .gitlab-ci.yml | 1 + SETUP.md | 1 - pysite/settings.py | 8 +++++--- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'pysite/settings.py') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 131e2089..b455fa0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,7 @@ test: services: - postgres:10-alpine script: + - python manage.py migrate - python manage.py test variables: DATABASE_URL: postgres://django:supersecret@postgres/pysite diff --git a/SETUP.md b/SETUP.md index 2a8c64e9..dd974338 100644 --- a/SETUP.md +++ b/SETUP.md @@ -6,7 +6,6 @@ - `psql -c 'CREATE DATABASE pysite OWNER pysite;'` - `echo 'DEBUG=1' >> .env` - `echo 'DATABASE_URL=postgres://pysite:@localhost/pysite' >> .env` -- `echo 'BOT_API_KEY=123456' >> .env` - `pipenv shell` - `python manage.py migrate` - `python manage.py runserver` diff --git a/pysite/settings.py b/pysite/settings.py index 16235e09..c7a21083 100644 --- a/pysite/settings.py +++ b/pysite/settings.py @@ -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