diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-07 19:28:13 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-07 19:28:13 +0000 |
| commit | f8adf99cdb449924b2ed2ddac33744da7eeb1efc (patch) | |
| tree | ec90970c9412bdc052d36be4473ac89e0c9b530f /django/contrib | |
| parent | 366710e6368fbb7530ccfae92a2b6faa40ea4bc1 (diff) | |
Fixed #9268: pass the "next" param through in the comment preview/post view. Also updated the docs to make this a bit clearer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib')
| -rw-r--r-- | django/contrib/comments/templates/comments/form.html | 1 | ||||
| -rw-r--r-- | django/contrib/comments/templates/comments/preview.html | 1 | ||||
| -rw-r--r-- | django/contrib/comments/views/comments.py | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/comments/templates/comments/form.html b/django/contrib/comments/templates/comments/form.html index ae0d6952b0..f0da620ec0 100644 --- a/django/contrib/comments/templates/comments/form.html +++ b/django/contrib/comments/templates/comments/form.html @@ -1,5 +1,6 @@ {% load comments i18n %} <form action="{% comment_form_target %}" method="post"> + {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %} {% for field in form %} {% if field.is_hidden %} {{ field }} diff --git a/django/contrib/comments/templates/comments/preview.html b/django/contrib/comments/templates/comments/preview.html index 8c7a434b18..9f9af1352d 100644 --- a/django/contrib/comments/templates/comments/preview.html +++ b/django/contrib/comments/templates/comments/preview.html @@ -6,6 +6,7 @@ {% block content %} {% load comments %} <form action="{% comment_form_target %}" method="post"> + {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %} {% if form.errors %} <h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1> {% else %} diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py index 32795431ce..ae3a672a80 100644 --- a/django/contrib/comments/views/comments.py +++ b/django/contrib/comments/views/comments.py @@ -80,6 +80,7 @@ def post_comment(request, next=None): template_list, { "comment" : form.data.get("comment", ""), "form" : form, + "next": next, }, RequestContext(request, {}) ) |
