changeset 0d758ef1c05b in www.tryton.org:default details: https://hg.tryton.org/www.tryton.org?cmd=changeset;node=0d758ef1c05b description: Use unique URL for news rss diffstat:
app.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (26 lines): diff -r 8fa965f705f6 -r 0d758ef1c05b app.py --- a/app.py Thu Jan 16 13:28:48 2020 +0100 +++ b/app.py Fri Jan 17 15:51:29 2020 +0100 @@ -32,6 +32,7 @@ from werkzeug.contrib.fixers import ProxyFix NEWS_URL = 'https://discuss.tryton.org/c/news' +NEWS_RSS_URL = NEWS_URL + '.rss' CALENDAR_URL = ( 'https://calendar.google.com/calendar/embed' '?src=p4jhgp9j5a2ehndebdglo6tslg%40group.calendar.google.com' @@ -307,12 +308,12 @@ @app.route('/news.rss') @app.route('/rss.xml') def news_rss(): - return redirect(NEWS_URL + '.rss') + return redirect(NEWS_RSS_URL) @cache.memoize(timeout=60 * 60) def fetch_news_items(): - return requests.get(NEWS_URL + '.rss').content + return requests.get(NEWS_RSS_URL).content def news_items(size=-1):
