django1/django/contrib/admin
Luke Plant 8e70cef9b6 Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
This is a large change to CSRF protection for Django.  It includes:

 * removing the dependency on the session framework.
 * deprecating CsrfResponseMiddleware, and replacing with a core template tag.
 * turning on CSRF protection by default by adding CsrfViewMiddleware to
   the default value of MIDDLEWARE_CLASSES.
 * protecting all contrib apps (whatever is in settings.py)
   using a decorator.

For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.

Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.

Details of the rationale for these changes is found here:

http://code.djangoproject.com/wiki/CsrfProtection

As of this commit, the CSRF code is mainly in 'contrib'.  The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-26 23:23:07 +00:00
..
media Fixed #10601 -- Fixed edit inline display in admin for right-to-left locales. 2009-04-11 13:45:45 +00:00
templates Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
templatetags Fixed #11502 - wrong escaping in admin. 2009-09-11 09:42:17 +00:00
views Fixed #10348: ChangeList no longer overwrites a select_related provided by `ModelAdmin.queryset()`. 2009-05-14 15:09:33 +00:00
__init__.py Fixed #10553 -- Corrected several uses of `URLconf` in documentation and comments, according to the Django style guide. Based on patch from rduffield. 2009-03-31 16:07:07 +00:00
actions.py Fixed #10997: fixed a Python 2.4-ism in admin actions. 2009-05-08 09:57:47 +00:00
filterspecs.py Fixed #9969: choices with options groups (added in [7977]) now work correctly in the admin with list_display and list_filter. Thanks, ramiro. 2009-04-01 14:14:20 +00:00
helpers.py Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to jsmullyan for the report, and mir for helpful triage work. Patch includes regression test for #8093, and a commented out test for #10992. 2009-05-09 11:40:13 +00:00
models.py Merged the newforms-admin branch into trunk. 2008-07-18 23:54:34 +00:00
options.py Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
sites.py Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
util.py Fixed a ungettext() call to prevent spurious string extraction by xgettext. 2009-03-25 01:31:57 +00:00
validation.py Moved _get_foreign_key call after testing for fk_name fixing a broken test. 2009-10-23 20:47:29 +00:00
widgets.py Fixed #11502 - wrong escaping in admin. 2009-09-11 09:42:17 +00:00