K
K
Kirill Pisarev2015-09-28 23:15:02
Django
Kirill Pisarev, 2015-09-28 23:15:02

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.
89b8e98eb4a94da6a4ffd77d84435f2f.png
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

2 answer(s)
R
Roman Kitaev, 2015-09-28
@P1sar

If the menu item is a model, then simply register this model in the admin panel.

I
IvanOne, 2015-09-29
@IvanOne

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 question

Ask a Question

731 491 924 answers to any question