From 4410641dabbbaf8f50da16fa6b594afe665b7872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexa=20Valentov=C3=A1?= <git@imaniti.org> Date: Mon, 10 Feb 2025 11:05:53 +0100 Subject: [PATCH] move career closing date by a day --- main/models.py | 6 +++--- main/templates/main/main_career_page.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/models.py b/main/models.py index fd0482ac..c752cd33 100644 --- a/main/models.py +++ b/main/models.py @@ -481,7 +481,7 @@ class MainCareersPage( current_date = date.today() if not show_closed: - filter = filter & models.Q(closing_date__gt=current_date) + filter = filter & models.Q(closing_date__gte=current_date) if category is not None: filter = filter & models.Q(category=category) @@ -609,8 +609,8 @@ class MainCareerPage( if ( request.method == "POST" - and self.closing_date > current_date - and self.submission_end_date > current_date + and self.closing_date >= current_date + and self.submission_end_date >= current_date ): form = CareerSubmissionForm(request.POST, request.FILES) diff --git a/main/templates/main/main_career_page.html b/main/templates/main/main_career_page.html index 97172130..42771275 100644 --- a/main/templates/main/main_career_page.html +++ b/main/templates/main/main_career_page.html @@ -16,7 +16,7 @@ <div class="bg-red-400 border border-solid border-red-600 p-4 inline-block mb-6"> <strong>Výběrové řízení uzavřeno.</strong> </div> - {% elif page.submission_end_date <= current_date %} + {% elif page.submission_end_date < current_date %} <div class="bg-red-400 border border-solid border-red-600 p-4 inline-block mb-6"> <strong>Přihlášky uzavřeny.</strong> </div> @@ -53,7 +53,7 @@ </div> {% endif %} - {% if page.closing_date > current_date and page.submission_end_date > current_date %} + {% if page.closing_date >= current_date and page.submission_end_date >= current_date %} <div data-micromodal-trigger="modal-1" class="lg:mb-3 mb-12 inline-block"> {% include "styleguide2/includes/atoms/buttons/round_button.html" with text="Přihlásit se" show_arrow_on_hover=True %} </div> @@ -61,7 +61,7 @@ </section> </main> - {% if page.closing_date > current_date and page.submission_end_date > current_date %} + {% if page.closing_date >= current_date and page.submission_end_date >= current_date %} <div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> <div class="modal__overlay" tabindex="-1"> <form -- GitLab