aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin.py')
-rw-r--r--app/views/admin.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/admin.py b/app/views/admin.py
index b971a1a..7891e50 100644
--- a/app/views/admin.py
+++ b/app/views/admin.py
@@ -1,5 +1,5 @@
from app import app, login_manager, db
-from flask import render_template, flash,url_for, redirect
+from flask import render_template, flash, url_for, redirect
import flask_login
from app.models import User
@@ -8,6 +8,7 @@ from flask_admin.contrib.sqla import ModelView
admin = Admin(app, name="Admin", template_mode="bootstrap4")
+
class ModelView(ModelView):
def is_accessible(self):
try:
@@ -17,4 +18,5 @@ class ModelView(ModelView):
except AttributeError:
return False
-admin.add_view(ModelView(User, db.session)) \ No newline at end of file
+
+admin.add_view(ModelView(User, db.session))