Migrate template settings to new Django version

master
Sebastian Lohff 4 년 전
부모 0d1efce614
커밋 eb6462be50

@ -13,7 +13,8 @@ https://docs.djangoproject.com/en/1.7/ref/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# BASE_DIR = os.path.dirname(os.path.dirname(__file__))
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
@ -25,8 +26,6 @@ SECRET_KEY = 'crv*hfx2pkxvq1s!)dbz*hdu+r7u2$y4djf6_#6mm)shk9e!58'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
STATICFILES_DIRS = (
@ -60,6 +59,23 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = 'dnmapper.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates/"), os.path.join(BASE_DIR, "bgpdata/templates")],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'dnmapper.wsgi.application'
@ -85,10 +101,6 @@ USE_I18N = True
USE_L10N = True
USE_TZ = True
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates/'),
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

불러오는 중...
취소
저장