diff options
-rw-r--r-- | pyaggr3g470r/templates/feed.html | 11 | ||||
-rw-r--r-- | pyaggr3g470r/views.py | 2 |
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']) |