django1/django/contrib/comments
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
..
templates/comments 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 #9303 (again) by removing some code missing in [9891]. 2009-03-21 13:45:15 +00:00
views Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default. 2009-10-26 23:23:07 +00:00
__init__.py 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
admin.py Fixed #11625: added comment moderation via admin actions. 2009-10-23 19:22:31 +00:00
feeds.py Fixed #10633, #10691: marked strings in the comments app for translation. Thanks, zgoda. 2009-04-07 19:57:01 +00:00
forms.py Fixed #9958: split the `CommentForm` into a set of smaller forms. This for better encapsulation, but also so that it's easier for subclasses to get at the pieces they might need. Thanks to Thejaswi Puthraya. 2009-03-21 13:45:31 +00:00
managers.py A few small fixes to django.contrib.comments (Comment.get_as_text for non-authenticated users; references to Comment.permalink; unused imports). Fixes #9143, #9429, and 9439. Thanks, Thejaswi Puthraya. 2009-01-12 17:27:41 +00:00
models.py Fixed #10633, #10691: marked strings in the comments app for translation. Thanks, zgoda. 2009-04-07 19:57:01 +00:00
moderation.py Fixed #11113: fixed a couple of issues that slipped through the cracks when comment moderation was added to `django.contrib.comments`. 2009-05-14 15:20:50 +00:00
signals.py Updated comment signals to provide enough information to actually act on. This was uncovered when working on the documentation, which'll be committed shortly. 2008-08-26 18:53:52 +00:00
urls.py Fixed #11625: added comment moderation via admin actions. 2009-10-23 19:22:31 +00:00