#9268: Pass custom form values from post-comment to preview-comment
----------------------------------------------+-----------------------------
Reporter: taojian | Owner: stuartk
Status: reopened | Milestone: 1.1
Component: django.contrib.comments | Version: SVN
Resolution: | Keywords: comment preview
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------------+-----------------------------
Changes (by saqimtiaz):
* status: closed => reopened
* resolution: fixed =>
Comment:
I'm afraid the next parameter is still not being passed through to the
preview template for me. I'm using the latest svn checkout, and have a
custom comment form with the next field. Redirects work as they should if
not previewing. When I try to preview, the form does not have the
necessary field. Further debugging of the preview template shows that next
is None in the template and therefore the field is not created. I believe
this is because the above fix is incomplete. It does not read the value of
next from the POST data before rendering the preview.
If we change "next": next in line 83 of comments.py to "next":
form.data.get("next",next), everything works as it should and next is
defined in the template:
http://code.djangoproject.com/browser/django/branches/releases/1.0.X/django/contrib/comments/views/comments.py?rev=10419#L83
For the time being I am working around this "bug" by getting the value of
next in the template via form.data.next
I'm very new to Django so there's a chance I may have missed something in
which case I apologize for possibly muddying the waters on this.
--
Ticket URL: <http://code.djangoproject.com/ticket/9268#comment:14>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---