#10169: Redirect in contrib.comments incorrect with default template
-------------------------------------+--------------------------------------
 Reporter:  ryan_freckleton          |       Owner:  nobody    
   Status:  new                      |   Milestone:            
Component:  django.contrib.comments  |     Version:  1.0       
 Keywords:  comments redirect bug    |       Stage:  Unreviewed
Has_patch:  0                        |  
-------------------------------------+--------------------------------------
 The form generated by flagging in contrib.comments includes the following:
 {{{
 <input type="hidden" name="next" value="None" id="next" />
 }}}

 As you can see, the value is the string "None". This POST is passed to the
 next_redirect method in django.contrib.comments.views.utils, where it is
 check against this code
 (source:django/trunk/django/contrib/comments/views/utils.py):
 {{{
 next = data.get("next", default)
 if next is None:
     next = urlresolvers.reverse(default_view)
 if get_kwargs:
     next += "?" + urllib.urlencode(get_kwargs)
 return HttpResponseRedirect(next)
 }}}

 Now, next is set to the string "None" when there isn't any redirect, since
 it exists the data.get('next', default) returns the string "None". Since
 there isn't any page called "None" this causes the redirect machinery to
 apparently go off into the weeds and not ever respond to the user with a
 page.

 It seems like the template has to be changed to conditionally display the
 hidden input. I can code up a quick patch if this is the case.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10169>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to