aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyaggr3g470r/templates/about.html2
-rw-r--r--pyaggr3g470r/templates/layout.html2
-rw-r--r--pyaggr3g470r/templates/management.html14
-rw-r--r--pyaggr3g470r/views.py7
4 files changed, 22 insertions, 3 deletions
diff --git a/pyaggr3g470r/templates/about.html b/pyaggr3g470r/templates/about.html
index 5bba9282..b07f337d 100644
--- a/pyaggr3g470r/templates/about.html
+++ b/pyaggr3g470r/templates/about.html
@@ -1,4 +1,4 @@
- {% extends "layout.html" %}
+{% extends "layout.html" %}
{% block content %}
<div class="container">
<p>This software is under GPLv3 license. You are welcome to copy, modify or
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index e0005115..7059532b 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -39,7 +39,7 @@
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="/fetch">Fetch</a></li>
- <li><a href="#services">Management</a></li>
+ <li><a href="/management/">Management</a></li>
<li><a href="#services">History</a></li>
<li><a href="/favorites/">Favorites</a></li>
<li><a href="#services">Unread</a></li>
diff --git a/pyaggr3g470r/templates/management.html b/pyaggr3g470r/templates/management.html
new file mode 100644
index 00000000..a50d16fb
--- /dev/null
+++ b/pyaggr3g470r/templates/management.html
@@ -0,0 +1,14 @@
+{% extends "layout.html" %}
+{% block content %}
+<div class="container">
+ <div class="jumbotron">
+ <h1>Subscriptions</h1>
+
+ </div>
+
+ <div class="jumbotron">
+ <h1>Database</h1>
+ <p>{{ nb_article }} articles are stored in the database.</p>
+ </div>
+</div><!-- /.container -->
+{% endblock %} \ No newline at end of file
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 7d5eeb30..a1a2055f 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -61,4 +61,9 @@ def favorites():
if article.like:
favorites[feed.title].append(article)
- return render_template('favorites.html', favorites=favorites) \ No newline at end of file
+ return render_template('favorites.html', favorites=favorites)
+
+@app.route('/management/', methods=['GET'])
+def management():
+ nb_article = len(models.Article.objects())
+ return render_template('management.html', nb_article=nb_article) \ No newline at end of file
bgstack15