Redirect on admin Save

django, django-admin

Solution

def change_view(self, request, object_id,extra_context=None):

result = super(mymodeladmin, self).change_view(request, object_id, extra_context)

result['Location'] = "your location"

return result

Problem

How can I redirect a user to different app on Save? I have two app, say `app1` and `app2`. If a user clicks on Save in `app2` then it should be redirected to `app1` rather then the default page. I don't want to do a customform.

Original source

Related problems