diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 15:04:45 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 15:04:45 +0100 |
commit | 07569ca2deae5d0ac2cc0f3298d68526dc05b9ff (patch) | |
tree | 76559eed6b6c90dca6f33c74fc49d9ab243a18e4 | |
parent | Added flake8 in dev requirements. (diff) | |
download | newspipe-07569ca2deae5d0ac2cc0f3298d68526dc05b9ff.tar.gz newspipe-07569ca2deae5d0ac2cc0f3298d68526dc05b9ff.tar.bz2 newspipe-07569ca2deae5d0ac2cc0f3298d68526dc05b9ff.zip |
fixed issues reported by flake8.
-rw-r--r-- | instance/production.py | 2 | ||||
-rwxr-xr-x | manager.py | 2 | ||||
-rw-r--r-- | newspipe/bootstrap.py | 1 | ||||
-rw-r--r-- | newspipe/lib/data.py | 3 | ||||
-rw-r--r-- | newspipe/web/views/views.py | 2 |
5 files changed, 7 insertions, 3 deletions
diff --git a/instance/production.py b/instance/production.py index 9dc56a76..7fd59916 100644 --- a/instance/production.py +++ b/instance/production.py @@ -41,7 +41,7 @@ MAIL_USE_SSL = False MAIL_DEBUG = DEBUG MAIL_USERNAME = None MAIL_PASSWORD = None -MAIL_DEFAULT_SENDER = ADMIN_EMAIL +MAIL_DEFAULT_SENDER = "admin@admin.localhost" # Misc BASE_DIR = os.path.abspath(os.path.dirname('.')) @@ -24,7 +24,7 @@ manager.add_command("db", MigrateCommand) def db_empty(): "Will drop every datas stocked in db." with application.app_context(): - web.models.db_empty(db) + newspipe.models.db_empty(db) @manager.command diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py index 0d140fae..1fdb32e2 100644 --- a/newspipe/bootstrap.py +++ b/newspipe/bootstrap.py @@ -6,6 +6,7 @@ import os import logging from urllib.parse import urlsplit +from flask import request from flask_babel import Babel, format_datetime diff --git a/newspipe/lib/data.py b/newspipe/lib/data.py index b27b5d80..5e9457b7 100644 --- a/newspipe/lib/data.py +++ b/newspipe/lib/data.py @@ -32,6 +32,7 @@ __license__ = "AGPLv3" import json import opml +import logging import datetime from flask import jsonify @@ -41,6 +42,8 @@ from newspipe.models.tag import BookmarkTag from newspipe.controllers import BookmarkController, BookmarkTagController +logger = logging.getLogger(__name__) + def import_opml(nickname, opml_content): """ Import new feeds from an OPML file. diff --git a/newspipe/web/views/views.py b/newspipe/web/views/views.py index e3a5091f..346954e1 100644 --- a/newspipe/web/views/views.py +++ b/newspipe/web/views/views.py @@ -16,7 +16,7 @@ logger = logging.getLogger(__name__) @current_app.errorhandler(401) def authentication_required(error): - if API_ROOT in request.url: + if application.conf["API_ROOT"] in request.url: return error flash(gettext("Authentication required."), "info") return redirect(url_for("login")) |