mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 08:09:37 +00:00
19 lines
591 B
Python
19 lines
591 B
Python
from app import app, db
|
|
from models import AdminUnit
|
|
from flask import render_template, flash, url_for, redirect, request, jsonify
|
|
from flask_babelex import gettext
|
|
from flask_security import auth_required, roles_required
|
|
from access import has_access, access_or_401
|
|
from sqlalchemy.sql import asc, func
|
|
|
|
@app.route("/admin")
|
|
@roles_required("admin")
|
|
def admin():
|
|
return render_template('admin/admin.html')
|
|
|
|
@app.route("/admin/admin_units")
|
|
@roles_required("admin")
|
|
def admin_admin_units():
|
|
return render_template('admin/admin_units.html',
|
|
admin_units=AdminUnit.query.all())
|