summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-06-17 13:12:28 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-06-17 13:12:28 +0000
commitc19d10c1807339b3395fa013f79c93ca1422d079 (patch)
tree45f2699c88da1ffbe49520d4cabc16438c27daf6
parentd0a3b92e4bf21820c5c91922e32d68449f8ea4d4 (diff)
[1.0.X] Fixed #9268 -- Ensured that the next argument is passed on when previewing comments. Thanks to leanmeandonothingmachine for the patch.
Merge of r11019 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@11020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/comments/views/comments.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py
index ae3a672a80..89a3dd9bba 100644
--- a/django/contrib/comments/views/comments.py
+++ b/django/contrib/comments/views/comments.py
@@ -37,6 +37,9 @@ def post_comment(request, next=None):
if not data.get('email', ''):
data["email"] = request.user.email
+ # Check to see if the POST data overrides the view's next argument.
+ next = data.get("next", next)
+
# Look up the object we're trying to comment about
ctype = data.get("content_type")
object_pk = data.get("object_pk")