Edited docs/releases/1.4.txt changes from [16124]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c2ba96d8a9
commit
c5cb2fabd2
|
@ -139,19 +139,18 @@ permanent (301 status code) to match the behavior of the
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Django's :doc:`comments app </ref/contrib/comments/index>` has historically
|
Django's :doc:`comments app </ref/contrib/comments/index>` has historically
|
||||||
supported excluding the comments of a special user group but never documented
|
supported excluding the comments of a special user group, but we've never
|
||||||
the feature properly and didn't enforce the exclusion in other parts of the
|
documented the feature properly and didn't enforce the exclusion in other parts
|
||||||
app, e.g. the template tags. To fix this problem the code was removed from
|
of the app, e.g., the template tags. To fix this problem, we removed the code
|
||||||
the feed class.
|
from the feed class.
|
||||||
|
|
||||||
If you rely on the feature and want to restore the old behavior, simply use
|
If you rely on the feature and want to restore the old behavior, simply use
|
||||||
a custom comment model manager to exclude the user group, e.g.::
|
a custom comment model manager to exclude the user group, like this::
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.comments.managers import CommentManager
|
from django.contrib.comments.managers import CommentManager
|
||||||
|
|
||||||
class BanningCommentManager(CommentManager):
|
class BanningCommentManager(CommentManager):
|
||||||
|
|
||||||
def get_query_set(self):
|
def get_query_set(self):
|
||||||
qs = super(BanningCommentManager, self).get_query_set()
|
qs = super(BanningCommentManager, self).get_query_set()
|
||||||
if getattr(settings, 'COMMENTS_BANNED_USERS_GROUP', None):
|
if getattr(settings, 'COMMENTS_BANNED_USERS_GROUP', None):
|
||||||
|
@ -174,7 +173,7 @@ Save this model manager in your custom comment app (e.g. in
|
||||||
|
|
||||||
objects = BanningCommentManager()
|
objects = BanningCommentManager()
|
||||||
|
|
||||||
For more details see the docs about
|
For more details, see the documentation about
|
||||||
:doc:`customizing the comments framework </ref/contrib/comments/custom>`.
|
:doc:`customizing the comments framework </ref/contrib/comments/custom>`.
|
||||||
|
|
||||||
`IGNORABLE_404_STARTS` and `IGNORABLE_404_ENDS` settings
|
`IGNORABLE_404_STARTS` and `IGNORABLE_404_ENDS` settings
|
||||||
|
|
Loading…
Reference in New Issue