aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-08-31 09:08:32 -0400
committerB. Stack <bgstack15@gmail.com>2023-08-31 09:08:32 -0400
commitb3e987bdea21e492854013c1f386eaed5a49920a (patch)
tree2935fdb2f585db548901858a2201f31403d8c3e4
parenttry a context processor (diff)
downloadnewspipe-b3e987bdea21e492854013c1f386eaed5a49920a.tar.gz
newspipe-b3e987bdea21e492854013c1f386eaed5a49920a.tar.bz2
newspipe-b3e987bdea21e492854013c1f386eaed5a49920a.zip
and now remove url_for from newspipe.lib.utils
-rw-r--r--newspipe/web/forms.py3
-rw-r--r--newspipe/web/views/admin.py3
-rw-r--r--newspipe/web/views/article.py3
-rw-r--r--newspipe/web/views/bookmark.py3
-rw-r--r--newspipe/web/views/category.py3
-rw-r--r--newspipe/web/views/feed.py3
-rw-r--r--newspipe/web/views/home.py3
-rw-r--r--newspipe/web/views/session_mgmt.py3
-rw-r--r--newspipe/web/views/user.py3
-rw-r--r--newspipe/web/views/views.py3
10 files changed, 10 insertions, 20 deletions
diff --git a/newspipe/web/forms.py b/newspipe/web/forms.py
index 0853d252..0f6200f8 100644
--- a/newspipe/web/forms.py
+++ b/newspipe/web/forms.py
@@ -26,7 +26,7 @@ __copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
import logging
-from flask import redirect, url_for as f_url_for
+from flask import redirect, url_for
from flask_babel import lazy_gettext
from flask_wtf import FlaskForm
from werkzeug.exceptions import NotFound
@@ -46,7 +46,6 @@ from wtforms.fields.html5 import EmailField, URLField
from newspipe.bootstrap import application
from newspipe.controllers import UserController, LdapuserController
from newspipe.lib import misc_utils
-from newspipe.lib.utils import url_for
from newspipe.models import User
logger = logging.getLogger(__name__)
diff --git a/newspipe/web/views/admin.py b/newspipe/web/views/admin.py
index 84395ff0..6f412901 100644
--- a/newspipe/web/views/admin.py
+++ b/newspipe/web/views/admin.py
@@ -4,14 +4,13 @@ from flask import Blueprint
from flask import flash
from flask import redirect
from flask import render_template
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import format_timedelta
from flask_babel import gettext
from flask_login import current_user
from flask_login import login_required
from newspipe.controllers import UserController
-from newspipe.lib.utils import url_for
from newspipe.web.forms import InformationMessageForm
from newspipe.web.forms import UserForm
from newspipe.web.views.common import admin_permission
diff --git a/newspipe/web/views/article.py b/newspipe/web/views/article.py
index df9d068f..8d4054db 100644
--- a/newspipe/web/views/article.py
+++ b/newspipe/web/views/article.py
@@ -7,7 +7,7 @@ from flask import make_response
from flask import redirect
from flask import render_template
from flask import request
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import gettext
from flask_login import current_user
from flask_login import login_required
@@ -18,7 +18,6 @@ from newspipe.controllers import UserController
from newspipe.lib.data import export_json
from newspipe.lib.utils import clear_string
from newspipe.lib.utils import redirect_url
-from newspipe.lib.utils import url_for
from newspipe.web.lib.view_utils import etag_match
articles_bp = Blueprint("articles", __name__, url_prefix="/articles")
diff --git a/newspipe/web/views/bookmark.py b/newspipe/web/views/bookmark.py
index c5410bf7..59461755 100644
--- a/newspipe/web/views/bookmark.py
+++ b/newspipe/web/views/bookmark.py
@@ -33,7 +33,7 @@ from flask import (
redirect,
render_template,
request,
- url_for as f_url_for,
+ url_for,
)
from flask_babel import gettext
from flask_login import current_user, login_required
@@ -44,7 +44,6 @@ from newspipe.bootstrap import db
from newspipe.controllers import BookmarkController
from newspipe.lib.data import export_bookmarks, import_pinboard_json
from newspipe.lib.utils import redirect_url
-from newspipe.lib.utils import url_for
from newspipe.web.forms import BookmarkForm
logger = logging.getLogger(__name__)
diff --git a/newspipe/web/views/category.py b/newspipe/web/views/category.py
index 015a926d..962e5478 100644
--- a/newspipe/web/views/category.py
+++ b/newspipe/web/views/category.py
@@ -2,7 +2,7 @@ from flask import Blueprint
from flask import flash
from flask import redirect
from flask import render_template
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import gettext
from flask_login import current_user
from flask_login import login_required
@@ -11,7 +11,6 @@ from newspipe.controllers import ArticleController
from newspipe.controllers import CategoryController
from newspipe.controllers import FeedController
from newspipe.lib.utils import redirect_url
-from newspipe.lib.utils import url_for
from newspipe.web.forms import CategoryForm
from newspipe.web.lib.view_utils import etag_match
diff --git a/newspipe/web/views/feed.py b/newspipe/web/views/feed.py
index 7da1139b..9499ba01 100644
--- a/newspipe/web/views/feed.py
+++ b/newspipe/web/views/feed.py
@@ -9,7 +9,7 @@ from flask import make_response
from flask import redirect
from flask import render_template
from flask import request
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import gettext
from flask_login import current_user
from flask_login import login_required
@@ -24,7 +24,6 @@ from newspipe.controllers import FeedController
from newspipe.controllers import UserController
from newspipe.lib import misc_utils
from newspipe.lib import utils
-from newspipe.lib.utils import url_for
from newspipe.lib.feed_utils import construct_feed_from
from newspipe.web.forms import AddFeedForm
from newspipe.web.lib.view_utils import etag_match
diff --git a/newspipe/web/views/home.py b/newspipe/web/views/home.py
index 58320766..8a3ee0a0 100644
--- a/newspipe/web/views/home.py
+++ b/newspipe/web/views/home.py
@@ -9,7 +9,7 @@ from flask import flash
from flask import redirect
from flask import render_template
from flask import request
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import get_locale
from flask_babel import gettext
from flask_login import current_user
@@ -21,7 +21,6 @@ from newspipe.controllers import CategoryController
from newspipe.controllers import FeedController
from newspipe.lib import misc_utils
from newspipe.lib.utils import redirect_url
-from newspipe.lib.utils import url_for
from newspipe.web.lib.view_utils import etag_match
from newspipe.web.views.common import jsonify
diff --git a/newspipe/web/views/session_mgmt.py b/newspipe/web/views/session_mgmt.py
index d1a3809d..5da74720 100644
--- a/newspipe/web/views/session_mgmt.py
+++ b/newspipe/web/views/session_mgmt.py
@@ -7,7 +7,7 @@ from flask import redirect
from flask import render_template
from flask import request
from flask import session
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import gettext
from flask_login import current_user
from flask_login import login_required
@@ -24,7 +24,6 @@ from werkzeug.security import generate_password_hash
from newspipe.bootstrap import application
from newspipe.controllers import UserController
-from newspipe.lib.utils import url_for
from newspipe.notifications import notifications
from newspipe.web.forms import SigninForm
from newspipe.web.forms import SignupForm
diff --git a/newspipe/web/views/user.py b/newspipe/web/views/user.py
index 13be22c6..7bb6e6b1 100644
--- a/newspipe/web/views/user.py
+++ b/newspipe/web/views/user.py
@@ -3,7 +3,7 @@ from flask import flash
from flask import redirect
from flask import render_template
from flask import request
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import gettext
from flask_login import current_user
from flask_login import login_required
@@ -20,7 +20,6 @@ from newspipe.controllers import UserController
from newspipe.lib import misc_utils
from newspipe.lib.data import import_json
from newspipe.lib.data import import_opml
-from newspipe.lib.utils import url_for
from newspipe.web.forms import ProfileForm
from newspipe.web.lib.user_utils import confirm_token
diff --git a/newspipe/web/views/views.py b/newspipe/web/views/views.py
index cced7c77..52d4e175 100644
--- a/newspipe/web/views/views.py
+++ b/newspipe/web/views/views.py
@@ -9,7 +9,7 @@ from flask import flash
from flask import redirect
from flask import render_template
from flask import request
-from flask import url_for as f_url_for
+from flask import url_for
from flask_babel import gettext
from sqlalchemy import desc
@@ -17,7 +17,6 @@ from newspipe.bootstrap import application
from newspipe.bootstrap import talisman
from newspipe.controllers import FeedController
from newspipe.controllers import UserController
-from newspipe.lib.utils import url_for
from newspipe.web import __version__, __git_url__
from newspipe.web.lib.view_utils import etag_match
bgstack15