From 0ebfbd159028ed6f84f4307b9d82a39e5e2a76f1 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sun, 23 Sep 2018 15:34:09 +0200 Subject: [PATCH] Don't limit news JSON feed to RSS feed items only If we limit it like that then there is no way to actually get to those news items. They should be included in the JSON feed, just not RSS, because the JSON feed is intended for internal consumption. Instead, add a boolean field to the actual *contents* representing the flag for inrss. --- postgresqleu/confreg/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresqleu/confreg/views.py b/postgresqleu/confreg/views.py index 8ef8ce3..eb596c8 100644 --- a/postgresqleu/confreg/views.py +++ b/postgresqleu/confreg/views.py @@ -172,7 +172,6 @@ def confhome(request, confname): def news_json(request, confname): news = ConferenceNews.objects.select_related('author').filter(conference__urlname=confname, - inrss=True, datetime__lt=datetime.now(), )[:5] @@ -182,6 +181,7 @@ def news_json(request, confname): 'datetime': n.datetime, 'authorname': n.author.fullname, 'summary': markdown.markdown(n.summary), + 'inrss': n.inrss, } for n in news], cls=JsonSerializer), content_type='application/json') -- 2.39.5