Browse Source

update core

Mr Duhaz 3 months ago
parent
commit
694550ddb5
3 changed files with 15 additions and 4 deletions
  1. 1 0
      .gitignore
  2. 2 2
      models.py
  3. 12 2
      views.py

+ 1 - 0
.gitignore

@@ -93,3 +93,4 @@ migrations/__pycache__/0021_auto_20240423_1338.cpython-39.pyc
 migrations/__pycache__/0022_page_p_proteger.cpython-39.pyc
 migrations/__pycache__/0022_page_p_proteger.cpython-39.pyc
 migrations/__pycache__/0022_page_p_proteger.cpython-312.pyc
 migrations/__pycache__/0022_page_p_proteger.cpython-312.pyc
 migrations/__pycache__/0023_auto_20240723_1757.cpython-312.pyc
 migrations/__pycache__/0023_auto_20240723_1757.cpython-312.pyc
+migrations/__pycache__/0023_auto_20240730_2056.cpython-312.pyc

+ 2 - 2
models.py

@@ -110,8 +110,8 @@ class Page (models.Model) : #Architecture pour les pages static est dynamique
 	p_publier = models.BooleanField("Publié", default = False)
 	p_publier = models.BooleanField("Publié", default = False)
 	p_proteger = models.BooleanField("Disponible que si authentifier", default = False)
 	p_proteger = models.BooleanField("Disponible que si authentifier", default = False)
 	p_see_title_and_des_in_templates = models.BooleanField("Description et titre visible dans les templates", default = True)
 	p_see_title_and_des_in_templates = models.BooleanField("Description et titre visible dans les templates", default = True)
-	p_card_main_panel= models.CharField("Afficage du cadre central",choices=page_bordure, max_length=3, default='def')
-	p_card_right_panel = models.CharField("Afficage du cadre de droite",choices=page_bordure, max_length=3, default='def')
+	p_c_card_mp = models.CharField("Afficage du cadre central",choices=page_bordure, max_length=3, default='def')
+	p_c_card_rp = models.CharField("Afficage du cadre de droite",choices=page_bordure, max_length=3, default='def')
 
 
 	class Meta :
 	class Meta :
 		verbose_name = 'Gestion des pages'
 		verbose_name = 'Gestion des pages'

+ 12 - 2
views.py

@@ -161,8 +161,18 @@ def gen_page_sys(p_titre_slugify):
 	page.c_bgimagelogo = get_data_value('background-logo')
 	page.c_bgimagelogo = get_data_value('background-logo')
 	page.c_menulogin = get_data_value('login-menu')
 	page.c_menulogin = get_data_value('login-menu')
 	page.c_includ_rp = get_data_value('includ-right-panel')
 	page.c_includ_rp = get_data_value('includ-right-panel')
-	page.c_card_mp = get_data_value('card-main-panel')
-	page.c_card_rp = get_data_value('card-right-panel')
+	if page.c_card_mp == "non":
+		page.c_card_mp = False
+	elif page.p_c_card_mp == "oui":
+		page.c_card_mp = True
+	else :
+		page.c_card_mp = get_data_value('card-main-panel')
+	if page.c_card_rp == "non":
+		page.c_card_rp = False
+	elif page.c_card_rp == "oui":
+		page.c_card_rp = True
+	else :
+		page.c_card_rp = get_data_value('card-right-panel')
 	
 	
 	return page
 	return page