Created
February 14, 2012 18:04
-
-
Save cooncesean/1828646 to your computer and use it in GitHub Desktop.
Get Comments for Publishable
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 Topic(Publishable): | |
@property | |
def comments(self): | |
return Comment.objects.filter(content_type=ContentType.objects.get_for_model(self), object_pk=self.id).order_by('id') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment