Browse files

Update admin INSTALLED_APPS requirements to 1.4

django.contrib.messages is required for admin to work
properly. Else changing password for user throws
error.
  • Loading branch information...
1 parent 8b4a275 commit d64dfe8ad3397cc410b402455d1f2fa5e0059311 @bharathwaaj bharathwaaj committed Feb 20, 2013
Showing with 11 additions and 3 deletions.
  1. +7 −1 chapter05.rst
  2. +4 −2 chapter06.rst
View
8 chapter05.rst
@@ -544,9 +544,11 @@ project. By default, it looks something like this::
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
)
-Temporarily comment out all four of those strings by putting a hash character
+Temporarily comment out all six of those strings by putting a hash character
(``#``) in front of them. (They're included by default as a common-case
convenience, but we'll activate and discuss them in subsequent chapters.)
While you're at it, comment out the default ``MIDDLEWARE_CLASSES`` setting, too;
@@ -557,14 +559,18 @@ list, so the setting ends up looking like this::
MIDDLEWARE_CLASSES = (
# 'django.middleware.common.CommonMiddleware',
# 'django.contrib.sessions.middleware.SessionMiddleware',
+ # 'django.middleware.csrf.CsrfViewMiddleware',
# 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ # 'django.contrib.messages.middleware.MessageMiddleware',
)
INSTALLED_APPS = (
# 'django.contrib.auth',
# 'django.contrib.contenttypes',
# 'django.contrib.sessions',
# 'django.contrib.sites',
+ # 'django.contrib.messages',
+ # 'django.contrib.staticfiles',
'mysite.books',
)
View
6 chapter06.rst
@@ -62,13 +62,15 @@ First, make a few changes to your settings file:
alphabetical so it's easy for a human to read.)
2. Make sure ``INSTALLED_APPS`` contains ``'django.contrib.auth'``,
- ``'django.contrib.contenttypes'`` and ``'django.contrib.sessions'``. The
+ ``'django.contrib.contenttypes'``, ``'django.contrib.messages'``
+ and ``'django.contrib.sessions'``. The
Django admin site requires these three packages. (If you're following
along with our ongoing ``mysite`` project, note that we commented out
- these three ``INSTALLED_APPS`` entries in Chapter 5. Uncomment them now.)
+ these four ``INSTALLED_APPS`` entries in Chapter 5. Uncomment them now.)
3. Make sure ``MIDDLEWARE_CLASSES`` contains
``'django.middleware.common.CommonMiddleware'``,
+ ``'django.contrib.messages.middleware.MessageMiddleware'``,
``'django.contrib.sessions.middleware.SessionMiddleware'`` and
``'django.contrib.auth.middleware.AuthenticationMiddleware'``. (Again,
if you're following along, note that we commented them out in Chapter 5,

0 comments on commit d64dfe8

Please sign in to comment.