Skip to content

Commit

Permalink
filter choices for application groups. now only open ones all over th…
Browse files Browse the repository at this point in the history
…e website. I promise
  • Loading branch information
CJGutz committed Sep 27, 2023
1 parent 46af547 commit ccb91ca
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 ccb91ca

Please sign in to comment.