
Old roles systems was not practical and too complicated. That is why I have removed the old system and starting new one. Meantime I have added a new admin application for admin functions.
15 lines
374 B
Python
15 lines
374 B
Python
import datetime
|
|
|
|
from flask import render_template, redirect, request, url_for, flash
|
|
from flask_login import login_user, logout_user, login_required, \
|
|
current_user
|
|
|
|
from . import admin
|
|
from .. import db
|
|
from ..models import User
|
|
from ..email import send_email
|
|
|
|
@admin.route('/')
|
|
@login_required
|
|
def for_admins_only():
|
|
return render_template('admin/index.html') |