feat: new dynamic pages in admin panel

This commit is contained in:
mohamad
2026-05-25 17:17:27 +03:30
parent f08d0aacc0
commit cacf1ba77b
14 changed files with 818 additions and 149 deletions
+6
View File
@@ -1,6 +1,7 @@
from django.db.models import Prefetch
from apps.core.models import SiteBranding, SiteContact
from apps.pages.models import CustomPage
from apps.products.models import MainProduct, SubProduct
@@ -28,8 +29,13 @@ def navigation(request):
all_footer_products = list(main_products[:5])
footer_main_products = all_footer_products[:4]
footer_main_products_has_more = len(all_footer_products) == 5
nav_custom_pages = CustomPage.objects.filter(
is_published=True,
show_in_nav=True,
).order_by("menu_order", "title")
return {
"nav_main_products": main_products,
"nav_custom_pages": nav_custom_pages,
"footer_main_products": footer_main_products,
"footer_main_products_has_more": footer_main_products_has_more,
}