From eb7b1c5507bf32b7f9c8c64aa636bebaefbba026 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Thu, 31 Aug 2023 10:18:33 -0400 Subject: use prefix() in all templates that need it --- newspipe/bootstrap.py | 16 ++++++++-------- newspipe/templates/article.html | 2 +- newspipe/templates/duplicates.html | 6 +++--- newspipe/templates/history.html | 2 +- newspipe/templates/home.html | 8 ++++---- newspipe/templates/layout.html | 2 +- newspipe/templates/login.html | 2 +- newspipe/templates/management.html | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) (limited to 'newspipe') diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py index 915c29db..3ca573b1 100644 --- a/newspipe/bootstrap.py +++ b/newspipe/bootstrap.py @@ -117,13 +117,13 @@ application.jinja_env.globals["application"] = application @application.context_processor def utility_processor(): - def url_for(endpoint, **values): - """ Custom reverse-proxy support for url_for """ - _uf = f_url_for(endpoint, **values) - #if prefix: - # _uf = str(prefix) + _uf - print(f"DEBUG: generating url_for {endpoint}, of {_uf}") - return _uf + #def url_for(endpoint, **values): + # """ Custom reverse-proxy support for url_for """ + # _uf = f_url_for(endpoint, **values) + # #if prefix: + # # _uf = str(prefix) + _uf + # print(f"DEBUG: generating url_for {endpoint}, of {_uf}") + # return _uf def prefix(): return _prefix.rstrip("/") - return dict(url_for=url_for,prefix=prefix) + return dict(prefix=prefix) diff --git a/newspipe/templates/article.html b/newspipe/templates/article.html index ef70d2df..256b7166 100644 --- a/newspipe/templates/article.html +++ b/newspipe/templates/article.html @@ -4,7 +4,7 @@

{{ article.title|safe }}

-

{{ _('from') }} {{ article.source.title }}

+

{{ _('from') }} {{ article.source.title }}

{% if article.like %} diff --git a/newspipe/templates/duplicates.html b/newspipe/templates/duplicates.html index 02fe83c0..d1382268 100644 --- a/newspipe/templates/duplicates.html +++ b/newspipe/templates/duplicates.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block content %}
-

{{ _('Duplicates in the feed') }} {{ feed.title }}.

+

{{ _('Duplicates in the feed') }} {{ feed.title }}.

@@ -19,8 +19,8 @@ {% for pair in duplicates %} - - + + {% endfor %} diff --git a/newspipe/templates/history.html b/newspipe/templates/history.html index c2da83d5..00e22ef3 100644 --- a/newspipe/templates/history.html +++ b/newspipe/templates/history.html @@ -43,7 +43,7 @@ diff --git a/newspipe/templates/home.html b/newspipe/templates/home.html index c292a32f..5feb18d1 100644 --- a/newspipe/templates/home.html +++ b/newspipe/templates/home.html @@ -42,7 +42,7 @@ {% if feed_id == feed.id %}{% endif %} {% endif %}
{{ loop.index }} {{ pair[0].title }} ({{ pair[0].retrieved_date }}) {{ pair[1].title }} ({{ pair[1].retrieved_date }}) {{ pair[0].title }} ({{ pair[0].retrieved_date }}) {{ pair[1].title }} ({{ pair[1].retrieved_date }})
- {{ article.source.title | safe }} + {{ article.source.title | safe }} diff --git a/newspipe/templates/layout.html b/newspipe/templates/layout.html index 29efd623..90919a7a 100644 --- a/newspipe/templates/layout.html +++ b/newspipe/templates/layout.html @@ -21,7 +21,7 @@ {% block menu %}