Created
January 21, 2012 00:57
-
-
Save sleekslush/1650519 to your computer and use it in GitHub Desktop.
Queryset example with DetailView
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 MyView(DetailView): | |
def get_queryset(self): | |
queryset = super(MyView, self).get_queryset() | |
return queryset.filter(my_cool_field=42) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment