Skip to content
Browse files

Merge pull request #32 from bharathwaaj/master

Update admin INSTALLED_APPS requirements to 1.4
  • Loading branch information...
2 parents 284ff52 + d64dfe8 commit 0d2403199c472f27a392821401638e478280355e @jacobian jacobian committed
Showing with 13 additions and 5 deletions.
  1. +8 −2 chapter05.rst
  2. +5 −3 chapter06.rst
View
10 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,7 +559,9 @@ 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 = (
@@ -565,6 +569,8 @@ list, so the setting ends up looking like this::
# 'django.contrib.contenttypes',
# 'django.contrib.sessions',
# 'django.contrib.sites',
+ # 'django.contrib.messages',
+ # 'django.contrib.staticfiles',
'mysite.books',
)
@@ -1382,4 +1388,4 @@ case it would be helpful to have a Web-based interface for entering and
managing data. The next chapter `Chapter 6`_ covers Django's admin interface, which exists
precisely for that reason.
-.. _Chapter 6: chapter06.rst/
+.. _Chapter 6: chapter06.rst/
View
8 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,
@@ -987,4 +989,4 @@ So far we've created a few models and configured a top-notch interface for
editing data. In the next chapter `Chapter 7`_, we'll move on to the real "meat and potatoes"
of Web development: form creation and processing.
-.. _Chapter 7: chapter07.rst/
+.. _Chapter 7: chapter07.rst/

0 comments on commit 0d24031

Please sign in to comment.
Something went wrong with that request. Please try again.