Hi all,

Recently, it's trend to use icons or emoji before menu items and I like 
this idea because  IMHO people orient better and more quickly when they see 
picture.

What about to add this feature to native django? I thought the easiest way 
would be to add new Meta option to Model. The default Meta icon would be 
empty string so everything would work like now. If I want to make menu more 
readable, I just add emoji (🔨) or html (Awesome font - *<i class="fa-solid 
fa-hammer"></i>* , Bootstrap icon - *<i class="bi bi-hammer"></i>*, etc.) 
to Meta icon.

Code example:

*Model:*
class Hammer(models.Model):
    ...

    Meta:
        icon = '<i class="fa-solid fa-hammer"></i>'

*app_list.html template:*
...
<th scope="row">{{model.icon}} {{model.name}}</th>
...

Final result:
[image: admin navbar.png]

Maybe own icon could have even the parent app (AppConfig). And the model 
icon could be in breadcrumbs.

What do you think about this idea? 🙂

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/09b292b3-25e1-42b6-b3fa-b92948e35b29n%40googlegroups.com.
  • Mod... Marty
    • ... Yeonggwang Yang
      • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
        • ... Arthur Pemberton

Reply via email to