Custom page in Django admin

Hello, i need in My project create a page in the Django admin, and in this page have 2 date fields and a button. This is not a model is for export a report from this button. I need go to this page from a button in the same admin. What is the Best way for do this? Thanks

First we need to be clear on some terminology.

You are (most likely) not going to be “creating a page in the admin”. You will create a view in a different app that will render a page. You can assign that view to a url that starts with “admin/” if that’s where you want it referenced. Otherwise, it’s just another view that you would create in exactly the same way you would create any other view.

To add a button in the admin, you need to extend the template(s) in which that button will appear - see Overriding admin templates

1 Like