Re: HttpResponseRedirect(request.path) after request.POST issue

2010-05-14 Thread marty3d
I finally went half and half here, by posting to an /vote// url. Personally, I think handling the GET in the tag and the POST in a view is a bit messy, but perhaps I find a better solution later. After I got that to work properly, I also implemented an ajax version. I have never done that in Django

Re: HttpResponseRedirect(request.path) after request.POST issue

2010-05-14 Thread Tom Evans
On Thu, May 13, 2010 at 6:11 PM, marty3d wrote: > Thanks, that's a shame... > So I'm now trying to do the request.POST stuff in a view instead. > Since the idea is to have the voting app as decoupled as possible, is > there a slick way to pass, perhaps the whole object in this case, but > at least

Re: HttpResponseRedirect(request.path) after request.POST issue

2010-05-13 Thread marty3d
That's what I also figured. I began trying to pass content_type and object_id as hidden fields to the view. This didn't work (see code below), so I'm going to try to use the content_type as a part of the url. But perhaps you can explain why I can't use it in the form object? views.vote: def vote2(

Re: HttpResponseRedirect(request.path) after request.POST issue

2010-05-13 Thread Daniel Roseman
On May 13, 6:11 pm, marty3d wrote: > Thanks, that's a shame... > So I'm now trying to do the request.POST stuff in a view instead. > Since the idea is to have the voting app as decoupled as possible, is > there a slick way to pass, perhaps the whole object in this case, but > at least the name of

Re: HttpResponseRedirect(request.path) after request.POST issue

2010-05-13 Thread marty3d
Thanks, that's a shame... So I'm now trying to do the request.POST stuff in a view instead. Since the idea is to have the voting app as decoupled as possible, is there a slick way to pass, perhaps the whole object in this case, but at least the name of the model or similar together with the post?

Re: HttpResponseRedirect(request.path) after request.POST issue

2010-05-13 Thread Daniel Roseman
On May 13, 1:21 pm, marty3d wrote: > Hi! > > I'm making this small generic voting application and have stumbled > across a strange issue. > My idea is that the user comes to a page, like /news/slug where I'm > having an inclusion tag showing up/down voting controls. Select your > choice in the vot