Skip to content

Instantly share code, notes, and snippets.

@nickbarnwell
Created May 28, 2012 22:28
Show Gist options
  • Save nickbarnwell/2821472 to your computer and use it in GitHub Desktop.
Save nickbarnwell/2821472 to your computer and use it in GitHub Desktop.
Podio Commentable Explanation
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