change release section put video and more

This commit is contained in:
mohamad
2026-06-08 17:08:43 +03:30
parent 33b3477176
commit 7cddc03a57
33 changed files with 1657 additions and 93 deletions
+17 -1
View File
@@ -17,6 +17,7 @@ from .models import (
FAQEntry,
HeroSection,
HomepageSection,
PageVideo,
)
@@ -71,6 +72,14 @@ class FAQView(ListView):
context_object_name = "faq_entries"
queryset = FAQEntry.objects.filter(is_active=True)
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx["faq_videos"] = PageVideo.objects.filter(
page=PageVideo.PAGE_FAQ,
is_active=True,
).order_by("order")
return ctx
class ContactView(View):
template_name = "pages/contact.html"
@@ -84,7 +93,14 @@ class ContactView(View):
return render(
request,
self.template_name,
{"form": ContactForm(), "captcha_question": self._new_captcha(request)},
{
"form": ContactForm(),
"captcha_question": self._new_captcha(request),
"contact_videos": PageVideo.objects.filter(
page=PageVideo.PAGE_CONTACT,
is_active=True,
).order_by("order"),
},
)
def post(self, request, *args, **kwargs):