From b8c6de31a6f08321a6cf6e3ede2dab90c9f1febd Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 8 Feb 2013 16:32:09 +0100 Subject: [1.5.x] Fixed #19779 -- Checked contrib.sites presence in RedirectFallbackMiddleware Thanks Aymeric Augustin for the report and directions for the patch. Backport of 2ed90eac from master. --- docs/ref/contrib/redirects.txt | 9 +++++---- docs/ref/contrib/sites.txt | 1 + docs/releases/1.5.txt | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/redirects.txt b/docs/ref/contrib/redirects.txt index e34ba405f4..0c0cb2a3c2 100644 --- a/docs/ref/contrib/redirects.txt +++ b/docs/ref/contrib/redirects.txt @@ -13,11 +13,12 @@ Installation To install the redirects app, follow these steps: -1. Add ``'django.contrib.redirects'`` to your :setting:`INSTALLED_APPS` - setting. -2. Add ``'django.contrib.redirects.middleware.RedirectFallbackMiddleware'`` +1. Ensure that the ``django.contrib.sites`` framework + :ref:`is installed `. +2. Add ``'django.contrib.redirects'`` to your :setting:`INSTALLED_APPS` setting. +3. Add ``'django.contrib.redirects.middleware.RedirectFallbackMiddleware'`` to your :setting:`MIDDLEWARE_CLASSES` setting. -3. Run the command :djadmin:`manage.py syncdb `. +4. Run the command :djadmin:`manage.py syncdb `. How it works ============ diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt index 7e5448b3d3..c9ee4d04fe 100644 --- a/docs/ref/contrib/sites.txt +++ b/docs/ref/contrib/sites.txt @@ -246,6 +246,7 @@ To do this, you can use the sites framework. A simple example:: >>> 'http://%s%s' % (Site.objects.get_current().domain, obj.get_absolute_url()) 'http://example.com/mymodel/objects/3/' +.. _enabling-the-sites-framework: Default site and ``syncdb`` =========================== diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt index a5ce08aed6..33dcb0e794 100644 --- a/docs/releases/1.5.txt +++ b/docs/releases/1.5.txt @@ -653,6 +653,12 @@ Miscellaneous Attempting to load it with ``{% load adminmedia %}`` will fail. If your templates still contain that line you must remove it. +* Because of an implementation oversight, it was possible to use + :doc:`django.contrib.redirects ` without enabling + :doc:`django.contrib.sites `. This isn't allowed any + longer. If you're using ``django.contrib.redirects``, make sure + :setting:``INSTALLED_APPS`` contains ``django.contrib.sites``. + Features deprecated in 1.5 ========================== -- cgit v1.3