1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

magic-removal: Proofread docs/redirects.txt

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-04-29 01:59:25 +00:00
parent 0d2a34683d
commit a5bae83575

View File

@ -8,12 +8,12 @@ redirects in a database and handles the redirecting for you.
Installation Installation
============ ============
To install the redirects app, follow these two steps: To install the redirects app, follow these steps:
1. Add ``"django.contrib.redirects"`` to your INSTALLED_APPS_ setting. 1. Add ``'django.contrib.redirects'`` to your INSTALLED_APPS_ setting.
2. Add ``"django.contrib.redirects.middleware.RedirectFallbackMiddleware"`` 2. Add ``'django.contrib.redirects.middleware.RedirectFallbackMiddleware'``
to your MIDDLEWARE_CLASSES_ setting. to your MIDDLEWARE_CLASSES_ setting.
3. Run the command ``django-admin.py install redirects``. 3. Run the command ``manage.py syncdb``.
.. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps .. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps
.. _MIDDLEWARE_CLASSES: http://www.djangoproject.com/documentation/settings/#middleware-classes .. _MIDDLEWARE_CLASSES: http://www.djangoproject.com/documentation/settings/#middleware-classes
@ -21,9 +21,8 @@ To install the redirects app, follow these two steps:
How it works How it works
============ ============
``django-admin.py install redirects`` creates a ``django_redirect`` table in ``manage.py syncdb`` creates a ``django_redirect`` table in your database. This
your database. This is a simple lookup table with ``site_id``, ``old_path`` and is a simple lookup table with ``site_id``, ``old_path`` and ``new_path`` fields.
``new_path`` fields.
The ``RedirectFallbackMiddleware`` does all of the work. Each time any Django The ``RedirectFallbackMiddleware`` does all of the work. Each time any Django
application raises a 404 error, this middleware checks the redirects database application raises a 404 error, this middleware checks the redirects database