-1
I am a beginner with Python and Django and I am doing a menu Enerico, I would like to know how to list in Django Admin the items related to a menu in Modeladmin Menu
class Menu(models.Model):
menu = models.CharField('Menu', max_length=150)
def __str__(self):
return self.menu
class Item(models.Model):
label = models.CharField('Item', max_length=150)
url = models.CharField('Url', max_length=150)
menu = models.ForeignKey(Menu)
def __str__(self):
return self.label