On 19-8-2012 2:26, Barry Morrison wrote:
> I have a view that displays images and gives me the ability to delete the 
> images.  
> 
> View url == /account/community/images/1 (1 == event_id)

Change <a href="images/{{event.pk}}"> to:
<a
href="images/{{event.pk}}?return_to=/account/community/images/{{event.pk}}">.
Keep passing this return_to parameter around. It helps to use the
request context processor so you can just grab it from the request
context in a template.

> I'd like the success_url to be /account/community/images{{ event.id }} the 
> page I came from

Subclass the Deleteview and implement get_success_url(), using
request.GET['return_to'] or if you decide to put a hidden input in the
delete form with the return_to value then obviously it's in request.POST.
-- 
Melvyn Sopacua

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