def __init__(self, entity): self.title = entity.title self.summary = entity.summary self.post = markdown(entity.post) self.category = CategoryView(entity.key.parent().get()).__dict__ self.tags = [TagView(tag.get()).__dict__ for tag in entity.tags] self.created = entity.created.isoformat() self.user = entity.user self.comment_count = 4
def __init__(self, entity): self.key = entity.key.urlsafe() self.parentKey = entity.key.parent().urlsafe() self.comment = markdown(entity.comment) self.created = entity.created.isoformat() self.name = entity.name self.approved = entity.approved self.spam = entity.spam gravatar_url = "http://www.gravatar.com/avatar/" + hashlib.md5(entity.email.lower()).hexdigest() + "?" gravatar_url += urllib.urlencode({'d': 'mm', 's': str(80)}) self.image = gravatar_url
def __init__(self, entity): self.key = entity.key.urlsafe() self.parentKey = entity.key.parent().urlsafe() self.comment = markdown(entity.comment) self.created = entity.created.isoformat() self.name = entity.name self.approved = entity.approved self.spam = entity.spam gravatar_url = "http://www.gravatar.com/avatar/" + hashlib.md5( entity.email.lower()).hexdigest() + "?" gravatar_url += urllib.urlencode({'d': 'mm', 's': str(80)}) self.image = gravatar_url
def __init__(self, preview): self.preview = markdown(preview)