From c3fba7d2aaf54d47c2f002ff4ed1e2c157189f0f Mon Sep 17 00:00:00 2001 From: Ratson Date: Thu, 19 Apr 2018 23:45:19 +0800 Subject: [PATCH] Django v1.7 --- project/project/settings.py | 13 +++++++------ project/project/urls.py | 2 -- project/project/wsgi.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/project/project/settings.py b/project/project/settings.py index 26e466d..a6b3523 100644 --- a/project/project/settings.py +++ b/project/project/settings.py @@ -2,10 +2,10 @@ Django settings for project project. For more information on this file, see -https://docs.djangoproject.com/en/1.6/topics/settings/ +https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.6/ref/settings/ +https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) @@ -14,7 +14,7 @@ # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '{SECRET_KEY}' @@ -43,6 +43,7 @@ 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) @@ -53,7 +54,7 @@ # Database -# https://docs.djangoproject.com/en/1.6/ref/settings/#databases +# https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { @@ -63,7 +64,7 @@ } # Internationalization -# https://docs.djangoproject.com/en/1.6/topics/i18n/ +# https://docs.djangoproject.com/en/1.7/topics/i18n/ LANGUAGE_CODE = 'en-us' @@ -77,6 +78,6 @@ # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.6/howto/static-files/ +# https://docs.djangoproject.com/en/1.7/howto/static-files/ STATIC_URL = '/static/' diff --git a/project/project/urls.py b/project/project/urls.py index 158a1f5..935a60a 100644 --- a/project/project/urls.py +++ b/project/project/urls.py @@ -1,7 +1,5 @@ from django.conf.urls import patterns, include, url - from django.contrib import admin -admin.autodiscover() urlpatterns = patterns('', # Examples: diff --git a/project/project/wsgi.py b/project/project/wsgi.py index 14d43cb..aa7fdcf 100644 --- a/project/project/wsgi.py +++ b/project/project/wsgi.py @@ -4,7 +4,7 @@ It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os