1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

comment_will_be_sent can cause a 400, not a 403

Doc cleanup for django.contrib.comments.signals.comment_will_be_sent
If a receiver returns False, an HttpResponse with status code 400
is returned. A test case already exists confirming this behavior.
Updated docs to reflect reality.
This commit is contained in:
Brandon Adams
2012-11-12 17:17:05 -05:00
parent ff0d3126af
commit d8ee46afff
2 changed files with 3 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ from django.dispatch import Signal
# Sent just before a comment will be posted (after it's been approved and
# moderated; this can be used to modify the comment (in place) with posting
# details or other such actions. If any receiver returns False the comment will be
# discarded and a 403 (not allowed) response. This signal is sent at more or less
# discarded and a 400 response. This signal is sent at more or less
# the same time (just before, actually) as the Comment object's pre-save signal,
# except that the HTTP request is sent along with this signal.
comment_will_be_posted = Signal(providing_args=["comment", "request"])