On May 29, 2009, at 5:40 AM, Kevin Fullerton wrote:

>
>
> On Thu, May 28, 2009 14:31, Eric Abrahamsen wrote:
>>
>> The default comment form does not include a next parameter, so if you
>> don't override the builtin comment templates you won't get any next
>> parameters in the forms.  The most sure way of doing this is using a
>> custom comment form with a next field – that way the form will  
>> include
>> the field no matter where it is used in your project. Otherwise, you
>> can use custom comment form and preview form templates – I'm guessing
>> you originally didn't have a custom preview template, which meant it
>> was using the builtin one, which meant... no next parameter in the
>> html form.
>
> Looking at the django source the next parameter is included in the  
> default
> preview template -
> http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/templates/comments/preview.html
> line 9
>

Hmm, no kidding, not sure how I missed that. Dmitri's suggestion and  
the linked ticket would work for a GET parameter "next", but for  
previews and error corrections a simple form input value should work  
(and does work, in my case). Have you tried getting rid of your GET  
parameter value altogether, and only using the form input? Are you  
doing anything else strange in comment submissions? Also, why are you  
giving different next values in the GET parameter and the form input  
value, below?

E

> The code I'm using to submit the comment looks similar to
>
> {% get_comment_form for object as form %}
> <form action="{% comment_form_target
> %}?next=http://blog.kenwa-solutions.co.uk/"; method="POST">
>    <input type="hidden" name="next"  
> value="{{ object.get_absolute_url }}" />
>
> <snip />
>
> So I'm not sure why the default preview form isn't picking it up
>
> 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