Answer the question
In order to leave comments, you need to log in
What to use to edit navigation menu from Django admin?
Good afternoon. Please advise on the following question.
There is a ready-made project that is written in Django, it became necessary to be able to add nested items from the admin panel to the site navigation bar.
Actually, the question is how to do this? Tell me which direction to look. I thought about Django-CMS, but it seemed too cumbersome, given that the functionality required is minimal. Plus, I didn’t quite understand how to integrate it into an already finished project.
Answer the question
In order to leave comments, you need to log in
If the menu item is a model, then simply register this model in the admin panel.
The first option is to create two models (menu, submenu) of the submenu connected via ForeignKey to the menu, but this is if you are sure that the nesting will be one level.
The second option is https://github.com/django-mptt/django-mptt/
Well, or look for ready-made menus
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question