Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django. Cancel button for form in admin site

Is there any functionality in admin site that allow to implement for every add/change form cancel button, that redirects me to list of that form objects. I mean some general solution for any form.

like image 496
sunprophit Avatar asked Sep 28 '11 18:09

sunprophit


1 Answers

Add admin/submit_line.html in your project's templates directory. Use the code from the default submit_line.html, and add your cancel button. You can link it to just "../" to make it always just go up one level. Then do any necessary CSS styling to make it look right.

like image 104
Chris Pratt Avatar answered Oct 20 '22 05:10

Chris Pratt