diff --git a/tdm_site/projects/forms.py b/tdm_site/projects/forms.py index 3b04166..828313d 100644 --- a/tdm_site/projects/forms.py +++ b/tdm_site/projects/forms.py @@ -8,7 +8,8 @@ from tdm_site.classtimes.models import Labtime, Lecturetime def get_choices(): - return list(zip(list(Project.objects.order_by().values_list("year", flat=True).distinct()), [int(v) for v in Project.objects.order_by().values_list("year", flat=True).distinct()])) + return list(zip([''] + [v for v in Project.objects.values_list("year", flat=True).distinct().order_by('-year')], [''] + [v for v in Project.objects.values_list("year", flat=True).distinct().order_by('-year')])) + #return list(zip(list(Project.objects.order_by().values_list("year", flat=True).distinct()), [int(v) for v in Project.objects.order_by().values_list("year", flat=True).distinct()])) class SearchProjectsForm(forms.Form): class Meta: diff --git a/tdm_site/projects/views.py b/tdm_site/projects/views.py index acff6c3..6b59329 100644 --- a/tdm_site/projects/views.py +++ b/tdm_site/projects/views.py @@ -71,9 +71,6 @@ def project_search_result_view(request): lab_times = request.GET.getlist('lab_times') lecture_times = request.GET.getlist('lecture_times') - print(f"{domain=}") - print(f"{citizenship_status=}") - if year not in ['', None]: queryset = queryset.filter(year=year)