Ejemplo n.º 1
0
    def get(self, id):
        post = Post.get_post_by_id(id, ignorestatus=True)
        self.datamap['category'] = Category.get_categorys()
        self.datamap['tags'] = Tag.get_tags()

        self.datamap['post'] = post

        self.datamap['chose_tag'] = [x.tag for x in post.tag]
        self.datamap['chose_category'] = [x.category for x in post.category]
        self.write(render_admin.editpost(self.datamap))
Ejemplo n.º 2
0
 def get(self):
     self.datamap['category'] = Category.get_categorys()
     self.datamap['tags'] = Tag.get_tags()
     self.write(render_admin.admin_newpost(self.datamap))