def get(self):
        categories = BlogCategory.all()

        return {
            "admin_section": "admin-blog-categories",
            "categories": categories,
        }
    def get(self, category = None):
        cur_category = None
        categories = BlogCategory.all()

        if category:
            cur_category = BlogCategory.all().filter("slug =", category).get()
            posts = BlogPost.all().filter("category =", cur_category).order("-date_created")
        else:
            posts = BlogPost.all().order("-date_created")
            cur_category = None

        return {
            "section": "blog",
            "posts": posts,
            "cur_category": cur_category,
            "categories": categories,
        }