On May 28, 2009, at 4:02 AM, Kevin Fullerton wrote:

>
> I'm working with django.contrib.comments at the moment, and so far  
> most
> things are working as expected.
>
> I'm building the submission form using {% get_comment_form for  
> object as
> form %} and have added the following as part of the form
>
> <input type="hidden" name="next"  
> value="{{ object.get_absolute_url }}" />
>
> As I understand it, that should force comments to redirect to that URL
> after successful submission - the problem is it doesn't.
>
> If I view the source of the submission form, the tag is there and
> populated correctly - if I preview or submit an incorrect POST then it
> brings up the preview screen, but there isn't a hidden next field in
> there.
>
> If I submit a correctly formed comment, it brings up the "Thank you  
> for
> your comment" template but doesn't redirect back to the original  
> object.
>
> I've tried removing the hidden field and doing
>
> <form action="{% comment_form_target %}? 
> next={{ object.get_absolute_url
> }}" method="POST">
>
> and have the same problem - is this a known problem, or is it  
> developer
> error (me)?

It's a known problem and the patch for this is already in trunk –  
update to r10418 or later, or you can stick the patch in yourself  
(it's a pretty clean one-liner).

HTH,
Eric


>
> Many thanks
>
> Kevin
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to