|
@@ -57,7 +57,8 @@ class Page (models.Model) : #Architecture pour les pages static est dynamique
|
|
p_type = models.CharField("Type de page",choices=page_type, max_length=8, default='page')
|
|
p_type = models.CharField("Type de page",choices=page_type, max_length=8, default='page')
|
|
p_adresse = models.CharField("Adresse", max_length = 64)
|
|
p_adresse = models.CharField("Adresse", max_length = 64)
|
|
p_menu_position = models.CharField("A utiliser dans un menu ?",choices=menu_pos, max_length=4, default='no')
|
|
p_menu_position = models.CharField("A utiliser dans un menu ?",choices=menu_pos, max_length=4, default='no')
|
|
- p_menu_parent = models.ForeignKey('self', blank = True, null=True, on_delete=models.PROTECT)
|
|
|
|
|
|
+ p_menu_est_parent = models.BooleanField("Utilisé comme parent", default = False)
|
|
|
|
+ p_menu_parent = models.ForeignKey('self',verbose_name="Parent", blank = True, null=True, on_delete=models.PROTECT, limit_choices_to={'p_menu_est_parent': True})
|
|
p_menu_poid = models.PositiveSmallIntegerField("Poid si utilisé dans les menus", default=50)
|
|
p_menu_poid = models.PositiveSmallIntegerField("Poid si utilisé dans les menus", default=50)
|
|
p_mots_clefs = models.CharField("Mots clefs", max_length = 512, blank = True)
|
|
p_mots_clefs = models.CharField("Mots clefs", max_length = 512, blank = True)
|
|
p_description = models.TextField("Description", blank = True)
|
|
p_description = models.TextField("Description", blank = True)
|