aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-08-11 23:43:43 +0200
committerGravatar Johannes Christ <[email protected]>2018-08-11 23:43:43 +0200
commit9a6f583ad2be8edacc4506e1ce4b24f2558109d2 (patch)
treedfaebc41cfc5361bce68dc84ed7d58757704d9d9
parentRemove nested URLconfs. (diff)
Add the `home` app.
-rw-r--r--home/__init__.py0
-rw-r--r--home/admin.py3
-rw-r--r--home/apps.py5
-rw-r--r--home/migrations/__init__.py0
-rw-r--r--home/models.py3
-rw-r--r--home/tests.py3
-rw-r--r--home/urls.py5
-rw-r--r--home/views.py3
-rw-r--r--pysite/settings.py42
9 files changed, 43 insertions, 21 deletions
diff --git a/home/__init__.py b/home/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/home/__init__.py
diff --git a/home/admin.py b/home/admin.py
new file mode 100644
index 00000000..8c38f3f3
--- /dev/null
+++ b/home/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/home/apps.py b/home/apps.py
new file mode 100644
index 00000000..90dc7137
--- /dev/null
+++ b/home/apps.py
@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class HomeConfig(AppConfig):
+ name = 'home'
diff --git a/home/migrations/__init__.py b/home/migrations/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/home/migrations/__init__.py
diff --git a/home/models.py b/home/models.py
new file mode 100644
index 00000000..71a83623
--- /dev/null
+++ b/home/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/home/tests.py b/home/tests.py
new file mode 100644
index 00000000..7ce503c2
--- /dev/null
+++ b/home/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/home/urls.py b/home/urls.py
new file mode 100644
index 00000000..077e7287
--- /dev/null
+++ b/home/urls.py
@@ -0,0 +1,5 @@
+from django.contrib import admin
+from django.urls import path
+
+
+urlpatterns = []
diff --git a/home/views.py b/home/views.py
new file mode 100644
index 00000000..91ea44a2
--- /dev/null
+++ b/home/views.py
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/pysite/settings.py b/pysite/settings.py
index 1a31d215..6ca2fa48 100644
--- a/pysite/settings.py
+++ b/pysite/settings.py
@@ -35,7 +35,7 @@ if DEBUG:
else:
SECRET_KEY = env('SECRET_KEY')
-ALLOWED_HOSTS = ["pythondiscord.com"]
+ALLOWED_HOSTS = ['pythondiscord.com']
# Application definition
@@ -64,19 +64,19 @@ MIDDLEWARE = [
"django_hosts.middleware.HostsResponseMiddleware",
]
-ROOT_URLCONF = "pysite.urls.main"
+ROOT_URLCONF = 'pysite.urls.main'
TEMPLATES = [
{
- "BACKEND": "django.template.backends.django.DjangoTemplates",
- "DIRS": [os.path.join(BASE_DIR, "pysite", "templates")],
- "APP_DIRS": True,
- "OPTIONS": {
- "builtins": [
+ 'BACKEND': "django.template.backends.django.DjangoTemplates",
+ 'DIRS': [os.path.join(BASE_DIR, 'pysite', 'templates')],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'builtins': [
"django_hosts.templatetags.hosts_override",
],
- "context_processors": [
+ 'context_processors': [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
@@ -86,14 +86,14 @@ TEMPLATES = [
},
]
-WSGI_APPLICATION = "pysite.wsgi.application"
+WSGI_APPLICATION = 'pysite.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
- "default": env.db()
+ 'default': env.db()
}
@@ -102,16 +102,16 @@ DATABASES = {
AUTH_PASSWORD_VALIDATORS = [
{
- "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
+ 'NAME': "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
- "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
+ 'NAME': "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
- "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
+ 'NAME': "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
- "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
+ 'NAME': "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
@@ -119,9 +119,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
-LANGUAGE_CODE = "en-us"
+LANGUAGE_CODE = 'en-us'
-TIME_ZONE = "UTC"
+TIME_ZONE = 'UTC'
USE_I18N = True
@@ -133,14 +133,14 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
-STATIC_URL = "/static/"
+STATIC_URL = '/static/'
# django-hosts
# https://django-hosts.readthedocs.io/en/latest/
-ROOT_HOSTCONF = "pysite.hosts"
-DEFAULT_HOST = 'main'
+ROOT_HOSTCONF = 'pysite.hosts'
+DEFAULT_HOST = 'home'
if DEBUG:
- PARENT_HOST = "pythondiscord.local:8000"
+ PARENT_HOST = 'pythondiscord.local:8000'
else:
- PARENT_HOST = "pythondiscord.com"
+ PARENT_HOST = 'pythondiscord.com'