summaryrefslogtreecommitdiff
path: root/app/views/categories.py
blob: e020a1184b84e1b507406d5b08991af37b48f63f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)