From 4788bb47f59dcd46325a582ca1e7ed76d8529161 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Fri, 17 Nov 2017 23:53:26 +0100 Subject: [PATCH] Fix HTML in feeds --- .../feeds/latest_publications_title.html | 2 +- scipost/templates/scipost/feeds.html | 12 +++++------ scipost/urls.py | 20 ++++++++----------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/scipost/templates/feeds/latest_publications_title.html b/scipost/templates/feeds/latest_publications_title.html index 803096e51..6558e2da8 100644 --- a/scipost/templates/feeds/latest_publications_title.html +++ b/scipost/templates/feeds/latest_publications_title.html @@ -1 +1 @@ -{{obj.in_issue.in_volume.in_journal.get_abbreviation_citation}} <strong>{{obj.in_issue.in_volume.number}}</strong>, {{obj.get_paper_nr}} ({{obj.publication_date|date:'Y'}}), by {{ obj.author_list }} +{{obj.in_issue.in_volume.in_journal.get_abbreviation_citation}} {{obj.in_issue.in_volume.number}}, {{obj.get_paper_nr}} ({{obj.publication_date|date:'Y'}}), by {{ obj.author_list }} diff --git a/scipost/templates/scipost/feeds.html b/scipost/templates/scipost/feeds.html index e0f841219..a547ec503 100644 --- a/scipost/templates/scipost/feeds.html +++ b/scipost/templates/scipost/feeds.html @@ -13,23 +13,23 @@ <h2>News feeds</h2> <p> We provide both RSS (2.0) and Atom feeds for latest news and announcements. - The URL of the RSS feed is <a href="https://scipost.org/rss/news/">https://scipost.org/rss/news/</a>. - The URL of the Atom feed is <a href="https://scipost.org/atom/news/">https://scipost.org/atom/news/</a>. + The URL of the RSS feed is <a href="{% url 'scipost:feeds_rss_news' %}">https://scipost.org/rss/news/</a>. + The URL of the Atom feed is <a href="{% url 'scipost:feeds_atom_news' %}">https://scipost.org/atom/news/</a>. </p> <h2>Publications feeds</h2> <p> Similarly, we provide feeds for the latest publications. - The URL of the general RSS feed is <a href="https://scipost.org/rss/publications/">https://scipost.org/rss/publications</a>. - The URL of the general Atom feed is <a href="https://scipost.org/atom/publications/">https://scipost.org/atom/publications/</a>. + The URL of the general RSS feed is <a href="{% url 'scipost:feeds_rss_publications' %}">https://scipost.org/rss/publications</a>. + The URL of the general Atom feed is <a href="{% url 'scipost:feeds_atom_publications' %}">https://scipost.org/atom/publications/</a>. </p> <p>You can also obtain feeds only for any specific specialization by using the links in the table below.</p> <h2>Submissions feeds</h2> <p> We also provide feeds for the latest submissions. - The URL of the general RSS feed is <a href="https://scipost.org/rss/submissions/">https://scipost.org/rss/submissions</a>. - The URL of the general Atom feed is <a href="https://scipost.org/atom/submissions/">https://scipost.org/atom/submissions/</a>. + The URL of the general RSS feed is <a href="{% url 'scipost:feeds_rss_submissions' %}">https://scipost.org/rss/submissions</a>. + The URL of the general Atom feed is <a href="{% url 'scipost:feeds_atom_submissions' %}">https://scipost.org/atom/submissions/</a>. </p> <p>You can also obtain feeds only for any specific specialization by using the links in the table below.</p> diff --git a/scipost/urls.py b/scipost/urls.py index fe4aaefa2..3389075ec 100644 --- a/scipost/urls.py +++ b/scipost/urls.py @@ -37,27 +37,23 @@ urlpatterns = [ # Feeds url(r'^feeds$', views.feeds, name='feeds'), - url(r'^rss/news/$', LatestNewsFeedRSS()), - url(r'^atom/news/$', LatestNewsFeedAtom()), - url(r'^rss/comments/$', LatestCommentsFeedRSS()), - url(r'^atom/comments/$', LatestCommentsFeedAtom()), - url(r'^rss/submissions/$', - LatestSubmissionsFeedRSS()), + url(r'^rss/news/$', LatestNewsFeedRSS(), name='feeds_rss_news'), + url(r'^atom/news/$', LatestNewsFeedAtom(), name='feeds_atom_news'), + url(r'^rss/comments/$', LatestCommentsFeedRSS(), name='feeds_rss_comments'), + url(r'^atom/comments/$', LatestCommentsFeedAtom(), name='feeds_atom_comments'), + url(r'^rss/submissions/$', LatestSubmissionsFeedRSS(), name='feeds_rss_submissions'), url(r'^rss/submissions/(?P<subject_area>[a-zA-Z]+:[A-Z]{2,})$', LatestSubmissionsFeedRSS(), name='sub_feed_spec_rss'), - url(r'^atom/submissions/$', - LatestSubmissionsFeedAtom()), + url(r'^atom/submissions/$', LatestSubmissionsFeedAtom(), name='feeds_atom_submissions'), url(r'^atom/submissions/(?P<subject_area>[a-zA-Z]+:[A-Z]{2,})$', LatestSubmissionsFeedAtom(), name='sub_feed_spec_atom'), - url(r'^rss/publications/$', - LatestPublicationsFeedRSS()), + url(r'^rss/publications/$', LatestPublicationsFeedRSS(), name='feeds_rss_publications'), url(r'^rss/publications/(?P<subject_area>[a-zA-Z]+:[A-Z]{2,})$', LatestPublicationsFeedRSS(), name='pub_feed_spec_rss'), - url(r'^atom/publications/$', - LatestPublicationsFeedAtom()), + url(r'^atom/publications/$', LatestPublicationsFeedAtom(), name='feeds_atom_publications'), url(r'^atom/publications/(?P<subject_area>[a-zA-Z]+:[A-Z]{2,})$', LatestPublicationsFeedAtom(), name='pub_feed_spec_atom'), -- GitLab