Live data from Hacker News

Customize Django Admin Interface

appliku.com

31–33 of 33 posts

Re: Customize Django Admin Interface

#31

We use the Django Admin A LOT. It's an amazing power. Lately, we've also added a Jupyter server connected to a read-only DB replica, with the Django models available. It's impressive how much you can do with these two tools. There's no need for an internal management dashboard or a BI tool. Just the admin and a bunch of notebooks. (Obligatory note: we are a bootstrapped startup)

Love Jupyter. Fantastic tools.

Re: Customize Django Admin Interface

#32
I’ve found htmx to be the ultimate Django customising machine. Just make an htmx view and stick it anywhere in your admin. You can do this either by overriding a specific model admin’s template for more complex logic (for example the change template), or by sticking the htmx view in an admin read only field (super simple and works very well).

This approach allows you to have some very complex views in the Django admin without ever touching the internal of the Django admin itself. I used to waste hours trying to get the admin to do what I wanted until I figured out this neat little trick.

Re: Customize Django Admin Interface

#33

Earlier quoted context omitted.

Strong opinion: DO NOT break up your project into apps. Make 1 app called core or common of whatever and replace models.py with models/ .py and import those into models/__init__.py Everyone jumps into apps with foreign keys across app boundaries and it makes a mess of things from the start that doesnt buy you anything. 1 app. 1 set of migrations. Turn models, views, etc into a package instead of the single file modul…

> Make 1 app called core or common Do not call it core. There's an existing app or module or something with that name and this will introduce hard-to-diagnose bugs. Common is preferable.

Thats a strawman. Many libs use common as well.
Post reply on HN