farridav / django-jazzmin

Jazzy theme for Django
https://django-jazzmin.readthedocs.io
MIT License
1.6k stars 277 forks source link

Support for django-nested-admin (feature) #189

Open valerytar opened 3 years ago

valerytar commented 3 years ago

I have many inline models that I would like to be nested in the admin interface. The django-nested-admin works pretty well with standard django admin but not with jazzmin. It would be great that jazzmin implements these nested_admin.NestedStackedInline and nested_admin.NestedTabularInline (with tabular/collapsible options). BTW, only Grappelli admin supports django-nested-admin currently.

TysonRV commented 3 years ago

@valerytar thanks for opening the issue! I really like the idea, so we will definitely look into this properly.

For what I can initially see, it's a matter of overwriting the inlines templates (stacked and tabular) taking that package into account. If you fancy giving it a go, we use adminlte components to easily overwrite admin templates: https://adminlte.io/themes/v3/pages/forms/general.html So feel free to ship a PR that could help us digging a bit more into it, as we have to do some initial work installing that package and making something sensible on our test app to support it. 😄

@farridav if Grappelli supports it... we should as well! 😬

farridav commented 3 years ago

For sure !

Just make sure when providing support for other apps, (or adding any code for that matter) that we keep overrides and new code to the minimum required, this will help us with maintainability.

Oh and it's gotta be jazzy :)

It should be easy to test out in the embedded test app

Laityned commented 3 years ago

I have an initial design on branch: https://github.com/digitalpatrol/django-jazzmin/tree/nested-admin

An integration into the test-app is provided. The library admin is adapted to a nested-admin with inline books which inlines loans.

Screenshots: image image