aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-22 21:40:58 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-22 21:40:58 +0100
commitfc0c5a0cef09150e2e718e46498a782c5a90be62 (patch)
tree99ca1800e37fbcad5361ba81097a7a59dfb530e8
parentallow insafe-inline (diff)
downloadnewspipe-fc0c5a0cef09150e2e718e46498a782c5a90be62.tar.gz
newspipe-fc0c5a0cef09150e2e718e46498a782c5a90be62.tar.bz2
newspipe-fc0c5a0cef09150e2e718e46498a782c5a90be62.zip
Display some information about the instance in the about/more page.
-rw-r--r--newspipe/templates/about_more.html10
-rw-r--r--newspipe/web/views/views.py5
2 files changed, 10 insertions, 5 deletions
diff --git a/newspipe/templates/about_more.html b/newspipe/templates/about_more.html
index 94a01c07..de034b4b 100644
--- a/newspipe/templates/about_more.html
+++ b/newspipe/templates/about_more.html
@@ -1,11 +1,13 @@
{% extends "layout.html" %}
{% block content %}
<div class="container">
+ <h2>{{ _('Information about this instance') }}</h2>
<ul class="list-group">
- <li class="list-group-item">{{ _('Newspipe version') }}: <a href="{{ version_url }}">{{newspipe_version}}</a></li>
- <li class="list-group-item">{{ _('Registration') }}: {{registration}}</li>
- <li class="list-group-item">{{ _('Python version') }}: {{python_version}}</li>
- <li class="list-group-item">{{ _('Number of users') }}: {{nb_users}}</li>
+ <li class="list-group-item">{{ _('Newspipe version') }}: <em><a href="{{ version_url }}">{{newspipe_version}}</a></em></li>
+ <li class="list-group-item">{{ _('Python version') }}: <em>{{python_version}}</em></li>
+ <li class="list-group-item">{{ _('Registration') }}: <em>{{registration}}</em></li>
+ <li class="list-group-item">{{ _('Number of users') }}: <em>{{nb_users}}</em></li>
+ <li class="list-group-item">{{ _('Content Security Policy') }}: <em>{{content_security_policy}}</em></li>
</ul>
</div><!-- /.container -->
{% endblock %}
diff --git a/newspipe/web/views/views.py b/newspipe/web/views/views.py
index a5d89ef0..a62eb706 100644
--- a/newspipe/web/views/views.py
+++ b/newspipe/web/views/views.py
@@ -7,7 +7,7 @@ from flask import current_app, flash, redirect, render_template, request, url_fo
from flask_babel import gettext
from sqlalchemy import desc
-from newspipe.bootstrap import application
+from newspipe.bootstrap import application, talisman
from newspipe.controllers import FeedController, UserController
from newspipe.web import __version__
from newspipe.web.lib.view_utils import etag_match
@@ -96,6 +96,8 @@ def about_more():
version[2][1:]
)
+ talisman._parse_policy(talisman.content_security_policy)
+
return render_template(
"about_more.html",
newspipe_version=newspipe_version,
@@ -105,4 +107,5 @@ def about_more():
],
python_version="{}.{}.{}".format(*sys.version_info[:3]),
nb_users=UserController().read().count(),
+ content_security_policy=talisman._parse_policy(talisman.content_security_policy),
)
bgstack15