aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-11-01 09:25:27 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-11-01 09:25:27 +0100
commitdd34398b95210a28bb02ed034186f7fa31a90495 (patch)
tree9a6a4292517facce826e9d1902a3772a68d63f8c /pyaggr3g470r
parentAdded new template for the list of feeds. (diff)
downloadnewspipe-dd34398b95210a28bb02ed034186f7fa31a90495.tar.gz
newspipe-dd34398b95210a28bb02ed034186f7fa31a90495.tar.bz2
newspipe-dd34398b95210a28bb02ed034186f7fa31a90495.zip
Added new template to display information about a feed.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/templates/feed.html11
-rw-r--r--pyaggr3g470r/views.py2
2 files changed, 12 insertions, 1 deletions
diff --git a/pyaggr3g470r/templates/feed.html b/pyaggr3g470r/templates/feed.html
new file mode 100644
index 00000000..972966ee
--- /dev/null
+++ b/pyaggr3g470r/templates/feed.html
@@ -0,0 +1,11 @@
+{% extends "layout.html" %}
+{% block content %}
+<div class="container">
+ <div class="jumbotron">
+ <h1>{{ feed.title }}</h1>
+ <p>This feed contains {{ feed.articles|count }} <a href="/articles/{{ feed.id }}">articles</a>.</p>
+ <p>Address of the feed: <a href="{{ feed.link }}">{{ feed.link }}</a>.</p>
+ <p>Address of the site: <a href="{{ feed.site_link }}">{{ feed.site_link }}</a>.</p>
+ </div>
+</div><!-- /.container -->
+{% endblock %} \ No newline at end of file
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index ae10a5a9..f33ae425 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -99,7 +99,7 @@ def feeds():
@app.route('/feed/<feed_id>', methods=['GET'])
@login_required
def feed(feed_id=None):
- feed = models.Article.objects(id=feed_id).first()
+ feed = models.Feed.objects(id=feed_id).first()
return render_template('feed.html', feed=feed)
@app.route('/article/<article_id>', methods=['GET'])
bgstack15