Redirecting to a different view after posting a form

2010-02-26 Thread hota990
www.financecollection.blogspot.com www.financecollection.blogspot.com www.financecollection.blogspot.com www.financecollection.blogspot.com www.financecollection.blogspot.com www.financecollection.blogspot.com -- You received this message because you are subscribed to the Google Groups "Django

Re: Redirecting to a different view after posting a form

2010-02-26 Thread bruno desthuilliers
On Feb 25, 11:22 pm, Timothy Kinney wrote: > I have taken a, perhaps, unorthodox tact for my admin views. I use > myproject/urls.py to grab the url and redirect to > myapp.admin_views.samurai_detail > > urls.py catches url patterns such as: >

Re: Redirecting to a different view after posting a form

2010-02-25 Thread Timothy Kinney
I have taken a, perhaps, unorthodox tact for my admin views. I use myproject/urls.py to grab the url and redirect to myapp.admin_views.samurai_detail urls.py catches url patterns such as: r'^admin/myapp/samurai/(?P.*)/add_item/$' r'^admin/myapp/samurai/(?P.*)/$ I am keeping all of my admin_views

Re: Redirecting to a different view after posting a form

2010-02-25 Thread Karen Tracey
On Thu, Feb 25, 2010 at 4:25 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 25 fév, 20:49, Timothy Kinney wrote: > > I think I'll just > > stick with urls. > > Mmmm... Fine for you if it works, but as far as I'm concerned I don't > like it. I do

Re: Redirecting to a different view after posting a form

2010-02-25 Thread bruno desthuilliers
On 25 fév, 20:49, Timothy Kinney wrote: > Thanks for the reply, Bruno. For some reason, that still doesn't work for > me. I can't figure out how to get reverse to work at all. But I took your > advice about HttpResponseRedirect and this worked fine: > > return

Re: Redirecting to a different view after posting a form

2010-02-25 Thread Timothy Kinney
Thanks for the reply, Bruno. For some reason, that still doesn't work for me. I can't figure out how to get reverse to work at all. But I took your advice about HttpResponseRedirect and this worked fine: return HttpResponseRedirect('../') Since my path structure is:

Re: Redirecting to a different view after posting a form

2010-02-25 Thread bruno desthuilliers
On Feb 25, 1:15 am, Timothy Kinney wrote: > I have two views: > samurai_detail > add_item_to_samurai > > There is a button in samurai_detail that links to add_item_to_samurai. > The templates are the same except that add_item_to_samurai includes a > form to add an item.

Re: Redirecting to a different view after posting a form

2010-02-24 Thread Timothy Kinney
I should have mentioned explicitly that these are admin views, not standard user views. I catch the url patterns for them in myproject/ urls.py. Maybe this changes how reverse must be used? -Tim On Feb 24, 6:15 pm, Timothy Kinney wrote: > I have two views: >

Redirecting to a different view after posting a form

2010-02-24 Thread Timothy Kinney
I have two views: samurai_detail add_item_to_samurai There is a button in samurai_detail that links to add_item_to_samurai. The templates are the same except that add_item_to_samurai includes a form to add an item. After posting the form, I want to redirect back to samurai_detail (the page