Ejemplo n.º 1
0
	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
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
	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
Ejemplo n.º 4
0
    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
Ejemplo n.º 5
0
	def __init__(self, preview):
		self.preview = markdown(preview)
Ejemplo n.º 6
0
 def __init__(self, preview):
     self.preview = markdown(preview)