|
@@ -15,7 +15,6 @@ import os
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
-
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
# Quick-start development settings - unsuitable for production
|
|
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
|
|
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
|
|
|
|
|
|
@@ -27,7 +26,6 @@ DEBUG = True
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
-
|
|
|
|
# Application definition
|
|
# Application definition
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
INSTALLED_APPS = [
|
|
@@ -37,6 +35,7 @@ INSTALLED_APPS = [
|
|
'django.contrib.sessions',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.staticfiles',
|
|
|
|
+ 'article',
|
|
]
|
|
]
|
|
|
|
|
|
MIDDLEWARE = [
|
|
MIDDLEWARE = [
|
|
@@ -54,7 +53,7 @@ ROOT_URLCONF = 'MyBlog.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': [
|
|
@@ -69,7 +68,6 @@ TEMPLATES = [
|
|
|
|
|
|
WSGI_APPLICATION = 'MyBlog.wsgi.application'
|
|
WSGI_APPLICATION = 'MyBlog.wsgi.application'
|
|
|
|
|
|
-
|
|
|
|
# Database
|
|
# Database
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
|
|
|
|
|
|
@@ -80,7 +78,6 @@ DATABASES = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
# Password validation
|
|
# Password validation
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
|
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
|
|
|
|
|
|
@@ -99,7 +96,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
},
|
|
},
|
|
]
|
|
]
|
|
|
|
|
|
-
|
|
|
|
# Internationalization
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/2.0/topics/i18n/
|
|
# https://docs.djangoproject.com/en/2.0/topics/i18n/
|
|
|
|
|
|
@@ -113,7 +109,6 @@ USE_L10N = True
|
|
|
|
|
|
USE_TZ = True
|
|
USE_TZ = True
|
|
|
|
|
|
-
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/2.0/howto/static-files/
|
|
# https://docs.djangoproject.com/en/2.0/howto/static-files/
|
|
|
|
|