feat: dynamic citation text and logo

This commit is contained in:
mohamad
2026-05-20 16:02:16 +03:30
parent 2341b32d4c
commit 24dd24e1c9
11 changed files with 181 additions and 29 deletions
+2 -1
View File
@@ -8,7 +8,7 @@ from django.views.generic import ListView, TemplateView
from apps.products.models import SubProduct
from .forms import ContactForm
from .models import AboutSection, ContactSubmission, FAQEntry, HomepageSection
from .models import AboutSection, ContactSubmission, FAQEntry, HeroSection, HomepageSection
class HomeView(TemplateView):
@@ -16,6 +16,7 @@ class HomeView(TemplateView):
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx["hero"] = HeroSection.objects.first()
ctx["homepage_sections"] = (
HomepageSection.objects.filter(is_active=True)
.prefetch_related("items")