On Thu, May 13, 2010 at 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
>

I can think of three options off the top of my head:

1) Have the voting app always submit to one view, regardless of the
current view. The voting app form could include a 'next' parameter,
indicating where to send the user back to.

2) Write the form processing code as a middleware. If you dont want
every page to handling posting this voting app form, use the
decorator_from_middleware adapter to turn your middleware into
something you can decorate specific views with.

3) Handle posts from the voting app with AJAX, always posting to the
same page, and updating the displayed content in the page when done.

Cheers

Tom

-- 
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