#10824: GET infos is lost
----------------------------------------+-----------------------------------
 Reporter:  roboter <son...@gmail.com>  |       Owner:  nobody    
   Status:  new                         |   Milestone:  1.1       
Component:  django.contrib.admin        |     Version:  SVN       
 Keywords:  GET info                    |       Stage:  Unreviewed
Has_patch:  0                           |  
----------------------------------------+-----------------------------------
 on the django admin,i new a model with GET info,the url is
 like:/admin/xxapp/a/add/?name=test.[[BR]]

 but when click "Save and add another",the new url is
 "/admin/xxapp/a/add/","?name=test" had losted.

 i goto django/contrib/admin/options.py,find a function:

 {{{
 def response_add(self, request, obj, post_url_continue='../%s/'):
    ...
    elif request.POST.has_key("_addanother"):
       self.message_user(request, msg + ' ' + (_("You may add another %s
 below.") % force_unicode(opts.verbose_name)))
       return HttpResponseRedirect(request.path)
 }}}

 this code lost GET info,please fix.
 and i write some code:

 {{{
 getinfos = request.GET.items()
 gets = '?'
 for info in getinfos:
     gets += '%s=%s&' % (info[0],info[1])

 path = request.path + gets
 return HttpResponseRedirect(path)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10824>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to