Created
March 10, 2013 21:05
-
-
Save drager/5130411 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
def get_queryset(self): | |
""" | |
Will get the queryset. | |
""" | |
forum_id = self.kwargs['forum_id'] | |
return Topic.objects.filter(forum__id=forum_id).order_by('-is_sticky', '-modified').select_related('last_post__topic', 'last_post__author', 'author') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment