Created
February 12, 2017 20:49
-
-
Save anddam/8903b390b9ef3986e72823ef375ac17f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_context_data(self, **kwargs): | |
context = super().get_context_data(**kwargs) | |
filter_argument = self.request.GET.get('filter') | |
if filter_argument: | |
cleaned_argument = filter_argument.strip() | |
if cleaned_argument: | |
context['filter'] = cleaned_argument | |
context['orderby'] = self.request.GET.get('orderby') | |
return context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment