From de05845887181f949780f5627570713b4d3ca93b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 6 Apr 2017 07:49:12 +0200 Subject: Added a page which displays some information about the instance. --- src/web/views/views.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/web/views') diff --git a/src/web/views/views.py b/src/web/views/views.py index b8d9514f..d599143f 100644 --- a/src/web/views/views.py +++ b/src/web/views/views.py @@ -1,3 +1,4 @@ +import sys import logging import operator from datetime import datetime, timedelta @@ -6,8 +7,9 @@ from flask import (request, render_template, flash, from flask_babel import gettext from sqlalchemy import desc +from web import __version__ from conf import API_ROOT, ADMIN_EMAIL -from web.controllers import FeedController +from web.controllers import FeedController, UserController from web.lib.view_utils import etag_match logger = logging.getLogger(__name__) @@ -74,9 +76,15 @@ def popular(): @current_app.route('/about', methods=['GET']) @etag_match def about(): - print(ADMIN_EMAIL) return render_template('about.html', contact=ADMIN_EMAIL) +@current_app.route('/about/more', methods=['GET']) +@etag_match +def about_more(): + return render_template('about_more.html', + newspipe_version=__version__.split()[1], + python_version="{}.{}.{}".format(*sys.version_info[:3]), + nb_users=UserController().read().count()) @current_app.route('/.well-known/acme-challenge/MmwFRp_wOgBGHcIULSUGVFDjpryEw_uWz7UgD6rE4t4') def letsencrypt(): -- cgit