aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin.py
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2021-06-06 10:11:00 +0000
committerGitHub <noreply@github.com>2021-06-06 10:11:00 +0000
commit6595d53212eaa4b9319da7196f5e2286d30eb462 (patch)
tree6fb829110658369321bab897707132f76f9b1b2c /app/views/admin.py
parent57207efe38174666d40964b74856537c6f5314ab (diff)
Format code with black
This commit fixes the style issues introduced in 57207ef according to the output from black. Details: https://deepsource.io/gh/navanchauhan/SaaS-in-a-Flask/transform/fb582430-1f1f-45bb-8c05-5f5bec16f981/
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))