Created
April 27, 2017 01:40
-
-
Save dvl/5dd704b36bbc6f27a699eaf3b80edd3c to your computer and use it in GitHub Desktop.
This file contains 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 FilterCurrentUserMixin(object): | |
def get_queryset(self): | |
queryset = super(FilterCurrentUserMixin, self).get_queryset() | |
queryset = queryset.filter(user=self.request.user) | |
return queryset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Como faria para implementar, tentei colocando desta forma "class List(ListView, FilterCurrentUserMixin):" mas retorna um erro.