Fixed an AttributeError on website and a deprecationwarning for middleware relocation.
This commit is contained in:
parent
b8b1f276d7
commit
9ed8e92c71
2 changed files with 6 additions and 6 deletions
|
|
@ -560,7 +560,7 @@ MIDDLEWARE_CLASSES = (
|
||||||
'django.contrib.messages.middleware.MessageMiddleware', # 1.4?
|
'django.contrib.messages.middleware.MessageMiddleware', # 1.4?
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.middleware.doc.XViewMiddleware',
|
'django.contrib.admindocs.middleware.XViewMiddleware',
|
||||||
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',)
|
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',)
|
||||||
# Context processors define context variables, generally for the template
|
# Context processors define context variables, generally for the template
|
||||||
# system to use.
|
# system to use.
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@ from django.conf.urls import url, include
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
|
|
||||||
# fix to resolve lazy-loading bug
|
## fix to resolve lazy-loading bug
|
||||||
# https://code.djangoproject.com/ticket/10405#comment:11
|
## https://code.djangoproject.com/ticket/10405#comment:11
|
||||||
from django.db.models.loading import cache as model_cache
|
#from django.db.models.loading import cache as model_cache
|
||||||
if not model_cache.loaded:
|
#if not model_cache.loaded:
|
||||||
model_cache.get_models()
|
# model_cache.get_models()
|
||||||
|
|
||||||
# loop over all settings.INSTALLED_APPS and execute code in
|
# loop over all settings.INSTALLED_APPS and execute code in
|
||||||
# files named admin.py in each such app (this will add those
|
# files named admin.py in each such app (this will add those
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue