Created
September 23, 2016 22:22
-
-
Save fernandogrd/bc4556a703deddaacab25948ab9de929 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
class FooMixin(object): | |
def filter_users(self, qs): | |
return qs.filter(x=y) | |
class FooView(View, FooMixin): | |
def get_queryset(self): | |
qs = super(FooView, self).get_queryset() | |
qs = self.filter_users(qs) | |
return qs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bad example because in that case a manager would be better