diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-06 15:44:45 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-06 15:44:45 +0530 |
commit | 62a5ca363415b0f6f98785b6c3522a71fc895a72 (patch) | |
tree | 6fb829110658369321bab897707132f76f9b1b2c /app/views/admin.py | |
parent | 57207efe38174666d40964b74856537c6f5314ab (diff) | |
parent | 6595d53212eaa4b9319da7196f5e2286d30eb462 (diff) |
Merge pull request #1 from navanchauhan/deepsource-transform-10f49d7d
Format code with black
Diffstat (limited to 'app/views/admin.py')
-rw-r--r-- | app/views/admin.py | 6 |
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)) |