Skip to content

Instantly share code, notes, and snippets.

@dan-gamble
Created December 30, 2014 16:56
Show Gist options
  • Save dan-gamble/ce7e06a5ed2de0ff27a3 to your computer and use it in GitHub Desktop.
Save dan-gamble/ce7e06a5ed2de0ff27a3 to your computer and use it in GitHub Desktop.
def get_context_data(self, **kwargs):
context = super(PlayerListView, self).get_context_data()
if self.request.GET:
context['form'] = PlayerFilterForm(self.request.GET)
else:
context['form'] = PlayerFilterForm
return context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment