|
@@ -1,26 +1,27 @@
|
|
|
"""
|
|
"""
|
|
|
Django settings for app project.
|
|
Django settings for app project.
|
|
|
|
|
|
|
|
-Generated by 'django-admin startproject' using Django 1.8.2.
|
|
|
|
|
|
|
+Generated by 'django-admin startproject' using Django 3.2.2.
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
For more information on this file, see
|
|
|
-https://docs.djangoproject.com/en/1.8/topics/settings/
|
|
|
|
|
|
|
+https://docs.djangoproject.com/en/3.2/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
For the full list of settings and their values, see
|
|
|
-https://docs.djangoproject.com/en/1.8/ref/settings/
|
|
|
|
|
|
|
+https://docs.djangoproject.com/en/3.2/ref/settings/
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
|
|
|
+from pathlib import Path
|
|
|
import os
|
|
import os
|
|
|
|
|
|
|
|
-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
|
|
|
+BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
# Quick-start development settings - unsuitable for production
|
|
|
-# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
|
|
|
|
|
|
|
+# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
-SECRET_KEY = '+g25&y9i+-6_z$$z!ov$l2s%b#0kcmnx)n7y*2_ehy-w011p#k'
|
|
|
|
|
|
|
+SECRET_KEY = 'django-insecure-&24ubb46zaej*fd9jz1^mw1t0)-@zd9g74f!hcs1a48-7loo0r'
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
DEBUG = True
|
|
DEBUG = True
|
|
@@ -30,34 +31,32 @@ ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
# Application definition
|
|
# Application definition
|
|
|
|
|
|
|
|
-INSTALLED_APPS = (
|
|
|
|
|
|
|
+INSTALLED_APPS = [
|
|
|
'django.contrib.admin',
|
|
'django.contrib.admin',
|
|
|
'django.contrib.auth',
|
|
'django.contrib.auth',
|
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.contenttypes',
|
|
|
'django.contrib.sessions',
|
|
'django.contrib.sessions',
|
|
|
'django.contrib.messages',
|
|
'django.contrib.messages',
|
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.staticfiles',
|
|
|
- 'app',
|
|
|
|
|
'webpack_loader',
|
|
'webpack_loader',
|
|
|
-)
|
|
|
|
|
|
|
+]
|
|
|
|
|
|
|
|
-MIDDLEWARE_CLASSES = (
|
|
|
|
|
|
|
+MIDDLEWARE = [
|
|
|
|
|
+ 'django.middleware.security.SecurityMiddleware',
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
- 'django.middleware.security.SecurityMiddleware',
|
|
|
|
|
-)
|
|
|
|
|
|
|
+]
|
|
|
|
|
|
|
|
ROOT_URLCONF = 'app.urls'
|
|
ROOT_URLCONF = 'app.urls'
|
|
|
|
|
|
|
|
TEMPLATES = [
|
|
TEMPLATES = [
|
|
|
{
|
|
{
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
- 'DIRS': [],
|
|
|
|
|
|
|
+ 'DIRS': [os.path.join(BASE_DIR, "templates")],
|
|
|
'APP_DIRS': True,
|
|
'APP_DIRS': True,
|
|
|
'OPTIONS': {
|
|
'OPTIONS': {
|
|
|
'context_processors': [
|
|
'context_processors': [
|
|
@@ -74,18 +73,18 @@ WSGI_APPLICATION = 'app.wsgi.application'
|
|
|
|
|
|
|
|
|
|
|
|
|
# Database
|
|
# Database
|
|
|
-# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
|
|
|
|
|
|
+# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
|
|
|
|
|
|
|
DATABASES = {
|
|
DATABASES = {
|
|
|
'default': {
|
|
'default': {
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
|
|
|
|
|
+ 'NAME': BASE_DIR / 'db.sqlite3',
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
# Internationalization
|
|
# Internationalization
|
|
|
-# https://docs.djangoproject.com/en/1.8/topics/i18n/
|
|
|
|
|
|
|
+# https://docs.djangoproject.com/en/3.2/topics/i18n/
|
|
|
|
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
|
|
@@ -99,7 +98,7 @@ USE_TZ = True
|
|
|
|
|
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
-# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
|
|
|
|
|
|
+# https://docs.djangoproject.com/en/3.2/howto/static-files/
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
@@ -110,6 +109,11 @@ STATICFILES_DIRS = (
|
|
|
WEBPACK_LOADER = {
|
|
WEBPACK_LOADER = {
|
|
|
'DEFAULT': {
|
|
'DEFAULT': {
|
|
|
'BUNDLE_DIR_NAME': 'bundles/',
|
|
'BUNDLE_DIR_NAME': 'bundles/',
|
|
|
- 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json')
|
|
|
|
|
|
|
+ 'STATS_FILE': os.path.join(BASE_DIR, 'assets/bundles/webpack-stats.json')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+# Default primary key field type
|
|
|
|
|
+# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
|
|
|
|
+
|
|
|
|
|
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|