django1/django/contrib
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
..
admin Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
admindocs Fixed #10061 -- Added namespacing for named URLs - most importantly, for the admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch. 2009-07-16 16:16:13 +00:00
auth Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
comments Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
contenttypes Fixed #11302 -- Avoid unnesscary (and possibly unintentional) queries/results from generic inline formsets. 2009-06-11 18:59:48 +00:00
csrf Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
databrowse Fixed #8172 -- Improved a whole bunch of contrib templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding 2008-09-08 05:19:28 +00:00
flatpages Cleaned up a bunch of minor doc stuff: 2008-09-02 16:42:13 +00:00
formtools Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
gis The `OGRGeometry.coord_dim` property may now be set; implemented a work-around for an OGR bug that changed geometries to 3D after transformation. Refs #11433. 2009-10-17 17:32:25 +00:00
humanize Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups). 2008-02-19 00:08:08 +00:00
localflavor Fixed #11746 -- Marked a string for translation in the FR localflavor. Thanks to iapain for the report and patch. 2009-09-13 04:40:17 +00:00
markup Fixed #6387 -- Updated markdown filter to handle markdown-1.7 as well as 2008-04-15 02:00:15 +00:00
redirects Cleaned up a bunch of minor doc stuff: 2008-09-02 16:42:13 +00:00
sessions Fixed #8193: all dynamic imports in Django are now done correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett! 2009-03-18 16:55:59 +00:00
sitemaps Fixed #8574 -- Made Sitemap a new-style class 2008-09-17 04:56:04 +00:00
sites Invalidate the appropriate SITE_CACHE entry when saving a Site model. 2009-02-27 04:57:33 +00:00
syndication Fixed #9957: feeds now respect time zone information provided by the pub date. 2009-04-07 21:20:14 +00:00
webdesign Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups). 2008-02-19 00:08:08 +00:00
__init__.py Created django.contrib and moved comments into it 2005-07-14 18:20:03 +00:00