Skip to content

Commit

Permalink
Add ability to filter by ndmn and indy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinamstutz committed Feb 27, 2024
1 parent c351f90 commit 071745b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tdm_site/projects/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions tdm_site/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 071745b

Please sign in to comment.