def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def forums():
    categories = Category.query.order_by(Category.position.asc()).all()
    return render_template("management/forums.html", categories=categories)