aboutsummaryrefslogtreecommitdiffstats
path: root/pysite
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-08-13 22:45:44 +0200
committerGravatar Johannes Christ <[email protected]>2018-08-13 22:45:44 +0200
commite740bccbee40ef136da80b52a2688c1e72528f8f (patch)
tree2d15c5e4107a1ceca63374cd05e32659a83adbf9 /pysite
parentAdd the `home` app. (diff)
Add regular URLconf.
Diffstat (limited to 'pysite')
-rw-r--r--pysite/hosts.py2
-rw-r--r--pysite/settings.py9
-rw-r--r--pysite/urls.py6
3 files changed, 13 insertions, 4 deletions
diff --git a/pysite/hosts.py b/pysite/hosts.py
index 03fb610b..28633be5 100644
--- a/pysite/hosts.py
+++ b/pysite/hosts.py
@@ -2,7 +2,7 @@ from django.conf import settings
from django_hosts import host, patterns
host_patterns = patterns(
- ''
+ '',
# > | Subdomain | URL Module | Host entry name |
#host(r"admin", "admin", name="admin"),
#host(r"api", "api", name="api"),
diff --git a/pysite/settings.py b/pysite/settings.py
index 6ca2fa48..5d770ca7 100644
--- a/pysite/settings.py
+++ b/pysite/settings.py
@@ -31,16 +31,18 @@ DEBUG = env('DEBUG')
# SECURITY WARNING: keep the secret key used in production secret!
if DEBUG:
+ ALLOWED_HOSTS = ['pythondiscord.local']
SECRET_KEY = "+_x00w3e94##2-qm-v(5&-x_@*l3t9zlir1etu+7$@4%!it2##"
else:
+ ALLOWED_HOSTS = ['pythondiscord.com']
SECRET_KEY = env('SECRET_KEY')
-ALLOWED_HOSTS = ['pythondiscord.com']
-
# Application definition
INSTALLED_APPS = [
+ "home",
+
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
@@ -64,7 +66,7 @@ MIDDLEWARE = [
"django_hosts.middleware.HostsResponseMiddleware",
]
-ROOT_URLCONF = 'pysite.urls.main'
+ROOT_URLCONF = 'pysite.urls'
TEMPLATES = [
{
@@ -134,6 +136,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/'
+STATICFILES_DIRS = [os.path.join(BASE_DIR, 'pysite', 'static')]
# django-hosts
# https://django-hosts.readthedocs.io/en/latest/
diff --git a/pysite/urls.py b/pysite/urls.py
new file mode 100644
index 00000000..0755f2ad
--- /dev/null
+++ b/pysite/urls.py
@@ -0,0 +1,6 @@
+from django.urls import include, path
+
+
+urlpatterns = [
+ path("", include("home.urls", namespace="home"))
+]