From dd34398b95210a28bb02ed034186f7fa31a90495 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 1 Nov 2013 09:25:27 +0100 Subject: Added new template to display information about a feed. --- pyaggr3g470r/templates/feed.html | 11 +++++++++++ pyaggr3g470r/views.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 pyaggr3g470r/templates/feed.html (limited to 'pyaggr3g470r') 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 %} +
+
+

{{ feed.title }}

+

This feed contains {{ feed.articles|count }} articles.

+

Address of the feed: {{ feed.link }}.

+

Address of the site: {{ feed.site_link }}.

+
+
+{% 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/', 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/', methods=['GET']) -- cgit