I would like to use the django contrib.admin pages to edit my models, but call individual change page from my own views, an then return there after user clicks "save".
Ideally this should happen by appending the return URL to the admin page's url (as in "...?_return_url=)
Any hints?
django.contrib.admin.options.ModelAdmin
objects have a response_change
method which you can override in a subclass to determine the response which should be returned after an object has been successfully saved - you could override this to return an appropriate HttpResponseRedirect
for the object which was just saved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With