Created
May 28, 2012 22:28
-
-
Save nickbarnwell/2821472 to your computer and use it in GitHub Desktop.
Podio Commentable Explanation
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 Commentable(object): | |
#anything that inherits from this can be commentable | |
@property | |
def comment_type(self): | |
return self.comment_type | |
@property | |
def comment_url(self) | |
return "/comment/%(comment_type)s/%(id)s" % vars | |
class Item(PodioObject, Commentable): | |
@property | |
def comment_type(self): | |
return "item" | |
Item.find(1).comment_url #Valid url is "/comment/item/1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment