linted some code
This commit is contained in:
parent
33dc5e14b5
commit
0cd7d1280e
@ -1,7 +1,7 @@
|
||||
from flask import Flask
|
||||
|
||||
# this import is not strictly necessary but it forces pipreqs-to include dotenv when generating `requirements.txt`
|
||||
import dotenv
|
||||
import dotenv
|
||||
|
||||
from the_works.database import init_db
|
||||
from the_works.views import home, text, werk, verlag, sprache, textform, werksform, genre, pseudonym, reihe, herausgeber, veroeffentlichung, titelbild
|
||||
@ -20,7 +20,7 @@ def create_app(config=None):
|
||||
|
||||
# use config from function parameter if present
|
||||
if config:
|
||||
app.config.update(config)
|
||||
app.config.update(config)
|
||||
|
||||
# some #DEBUG output
|
||||
print(f"Current Environment: {app.config['ENV'] if 'ENV' in app.config.keys() else 'ENV is not set'}") #DEBUG
|
||||
@ -46,7 +46,7 @@ def create_app(config=None):
|
||||
|
||||
# register helper function
|
||||
app.jinja_env.globals.update(sizeof_fmt=sizeof_fmt)
|
||||
|
||||
|
||||
return app
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# code is built upon output from sqlacodegen
|
||||
# code is built upon output from sqlacodegen
|
||||
|
||||
import sys
|
||||
from typing import List, Optional
|
||||
|
||||
@ -24,7 +24,7 @@ def update(id):
|
||||
db.session.commit()
|
||||
flash("Eintrag erfolgreich geändert")
|
||||
return redirect(url_for("genre.all"), code=303)
|
||||
|
||||
|
||||
@bp.route("/genre/delete/<int:id>")
|
||||
def delete(id):
|
||||
genre = db.session.get(Genre, id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user