from ..flask_extend import Blueprint from flask import render_template, request, url_for from ..model import Category mod = Blueprint('categories', __name__) def T(tpl): return "categories/%s.jinja" % tpl @mod.route("/") def manage (): categories = Category.query.order_by(Category.name).all() return render_template(T("manage"), cats = categories)