Last active
October 4, 2019 02:10
-
-
Save walison17/8d32d445bd0f56b12d0ca43bc8cc5bad 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 UserObjectsMixin: | |
def get_queryset(self): | |
qs = super().get_queryset() | |
return qs.filter(usuario=self.request.user) | |
class CoisasListView(LoginRequiredMixin, UserObjectsMixon, ListView): | |
login_url = '' | |
redirect_field_name = 'redirect_to' | |
model = Coisa | |
context_object_name = "coisas" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment