aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-07 14:01:55 +0530
committerGitHub <noreply@github.com>2021-06-07 14:01:55 +0530
commit7852d78515f8e108ba99dce270f58d48dce9ca5f (patch)
treeebf028184e6cdda656e885a0fd6284ba547979a9 /app/views
parent11a2e1c778cf4b2ea958b6bdd7868c8604d45df2 (diff)
parent47ac6500a959f04d5b8eeffe40499e6cefc8156c (diff)
Merge pull request #6 from navanchauhan/deepsource-transform-10eb3717
Format code with black
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin.py4
-rw-r--r--app/views/main.py1
2 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin.py b/app/views/admin.py
index 8588e87..56014a0 100644
--- a/app/views/admin.py
+++ b/app/views/admin.py
@@ -15,6 +15,7 @@ admin = Admin(app, name="Admin", template_mode="bootstrap4")
Initialised Admin Portal
"""
+
class ModelView(ModelView): # skipcq: PYL-E0102
"""
Our extended ModelView Class
@@ -23,6 +24,7 @@ class ModelView(ModelView): # skipcq: PYL-E0102
https://flask-admin.readthedocs.io/en/latest/introduction/?highlight=ModelView#modelview-configuration-attributes
"""
+
def is_accessible(self):
"""This function checks if a user should be given access or not"""
try:
@@ -33,4 +35,4 @@ class ModelView(ModelView): # skipcq: PYL-E0102
return False
-admin.add_view(ModelView(User, db.session)) \ No newline at end of file
+admin.add_view(ModelView(User, db.session))
diff --git a/app/views/main.py b/app/views/main.py
index d4d94e9..308c6ac 100644
--- a/app/views/main.py
+++ b/app/views/main.py
@@ -11,6 +11,7 @@ from flask import render_template, flash
from app.views import auth, error_pages, admin
from app.misc_func import flash_errors
+
@app.route("/")
@app.route("/index")
def index():