Skip to content

Commit

Permalink
Merge pull request #766 from hackerspace-ntnu/fix/filter-application-…
Browse files Browse the repository at this point in the history
…choices

fix(applications): filter applications
  • Loading branch information
michaelbrusegard authored Sep 27, 2023
2 parents 46af547 + ccb91ca commit d722b57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions applications/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class ApplicationInfoView(ListView):
template_name = "applications/application_info.html"
queryset = ApplicationGroup.objects.all()
queryset = ApplicationGroup.objects.filter(open_for_applications=True)

def get_context_data(self, **kwargs):
return {
Expand All @@ -34,5 +34,7 @@ def form_valid(self, form):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["group_choices"] = ApplicationGroup.objects.all()
context["group_choices"] = ApplicationGroup.objects.filter(
open_for_applications=True
)
return context

0 comments on commit d722b57

Please sign in to comment.