from flask import Blueprint, render_template from files.auth import admin_required from files.models import Category, FileType bp = Blueprint('admin', __name__, url_prefix='/admin') @bp.route('/') @admin_required def index(): return render_template( 'admin/index.html', categories=Category.query.all(), file_types=FileType.query.all())