On May 13, 6:11 pm, marty3d <martin.kjellb...@gmail.com> 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 the model or similar together with the post?
>
> Thanks!
> /Martin

So presumably this form appears, via the template tag, on a range of
pages, and you want to record in the voting model which page it came
from.

One way of doing this would be to set the form's action - ie the
destination it POSTs to - to a URL that includes parameters
representing the source page - eg /vote/sourcemodel/sourceid/. Then
the destination view can accept this information and save it alongside
the vote.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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