Generic menu using Python, Django and tree structure

1

I am creating a generic menu where a parent can have 1 child and so on (tree structure) and I had a question about how to render parents in a menu and when hovering over the parent open their children laterally

CurrentlyIonlyhavethiscodethattakesparentsandchildrentogether,IwouldliketoleaveeverythingseparatebutIdonotknowwhichwaytogo.

defdetails(request,pk):item=Item.objects.filter(fkmenu_id=pk)template_name='menu/menu.html'context={'items':item}returnrender(request,template_name,context)

models.py

I'm using mptt which is a lib for working with trees but so far nothing if anyone has any path without the mptt also works.

    
asked by anonymous 17.08.2017 / 17:45

0 answers