django-jazzmin icon indicating copy to clipboard operation
django-jazzmin copied to clipboard

Custom menu definition support

Open farridav opened this issue 3 years ago • 8 comments

Closes: https://github.com/farridav/django-jazzmin/issues/195

Aims to allow an entirely custom menu using an app-> model list mapping

e.g "custom_menu": {"auth": ["books.book"], "any_name": ["auth.user", "auth.group"]}

@djpretzel .. I have not forgotten about this, let me know if it supports your use case

TODO:

  • [x] Finish test
  • [ ] Update documentation

farridav avatar Dec 22 '20 15:12 farridav

@farridav Many thanks for remembering! Looks good, two questions:

  1. Is it possible to nest an "arbitrary" (non-app) menu item under another one, or under a traditional app menu item for that matter? Right now the menu model is basically two levels, but this would allow for a third (when using the custom menu option) or even fourth, which I believe AdminLTE will support? In other words, envisioned as a tree, it would be nice to have these arbitrary groupings available not only at the very top level, but also one (or potentially 2/3) levels down - if that makes sense?

  2. Will it cause issues for the "model_str" property if the "arbitrary name" text value is prefixed onto the model name, e.g. "arbitrary name.user" on line 213?

djpretzel avatar Dec 23 '20 05:12 djpretzel

  1. No, currently nested groups are not supported. this would require additional work, if this PR adds value right now, id suggest we move forwards with it, and follow up with something that allows for nesting, as i see this ending up a lot more complicated

  2. I have not spotted any issues so far, model_str is used for lookups in jazzmin config, e.g

    "icons": {
        "auth.user": "fas fa-user",
        "Arbitrary Name.user": "fas fa-user",
        ...
      }

Supporting N levels of nesting is definitely something that needs scoping out

farridav avatar Dec 31 '20 12:12 farridav

Hi! I just discovered django-jazzmin and love it. This PR seems to be only feature that I am actually missing out on. Are there any plans to move forward with this ?

ghost avatar Sep 03 '21 09:09 ghost

I've got a building list of things to take care of here, and my other maintainer is currently unavailable, so it's been tricky getting it all done, along with my other work.

This ticket is definitely one I want to get finished up, hopefully within the next few weeks if possible.

farridav avatar Sep 03 '21 09:09 farridav

I wonder if it is possible to add a apps group design in this feature as it is quite necessary for a project with a series of apps. I'm working with a project with a design of 12 apps devided into two different groups, and I really feel messy to look through the side menu. Using prefix in appconfig verbose name and order_respect_to is a replacement solution but my colleague said it was a really stupid way to deal with this problem hah :D.

RyanLoil avatar Sep 12 '21 03:09 RyanLoil

It's not a push, but just a question. How is this feature going? Can anyone give some help to get it finished? Thank you so much!

Pijuli avatar Dec 16 '21 16:12 Pijuli

Hey just checking to see if this feature still has a path forward. Thanks for the hard work!

chaleyct avatar Jun 06 '22 18:06 chaleyct

Yes this is still definitely something I want to get to, I'll try to set some time asides over the next couple of weeks to get it finished off, it's been sitting here for ages ... :(

On Mon, 6 Jun 2022, 19:54 chaleyct, @.***> wrote:

Hey just checking to see if this feature still has a path forward. Thanks for the hard work!

— Reply to this email directly, view it on GitHub https://github.com/farridav/django-jazzmin/pull/241#issuecomment-1147779460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWUF3KVPJIBOR7YFNFC3UTVNZCOJANCNFSM4VFZNZNA . You are receiving this because you were mentioned.Message ID: @.***>

farridav avatar Jun 06 '22 18:06 farridav