aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:49:56 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-06 15:49:56 +0530
commit812220acbfd41aea0382fcd9a37a989a4b091d66 (patch)
tree0f4277216efe81e6b8d21d9dfc39a3d343fac48e /app/views/admin.py
parentad92a42e8439337cfde346fa84e75a5f91164eac (diff)
parent62a5ca363415b0f6f98785b6c3522a71fc895a72 (diff)
fixing pull
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))