Haki Benita
1 min readJun 22, 2020

--

> Are there any recommended best practices when it comes to extending the admin’s views?

Not that I know of. The documentation does not have a lot of informantion about about this perticular subject.

> I ended up writing that new view in a “views.py”, it made more sense to me.

What ever makes sense for yo is best! Do note, that in order for the view to work as part of the Django admin and look like an integral part of it, you have to do some adjustments to the context, for example `context = self.admin_site.each_context(request) `

--

--

Haki Benita
Haki Benita

Written by Haki Benita

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

Responses (2)