Quantcast
Viewing latest article 12
Browse Latest Browse All 12

Django RSS feed: any way to cache M2M relationship to display in item_title?

Example models Author and Book are linked via M2M. I've found a way to cache the relationship in items, but that doesn't really help because I need to display some info about Author in the Book feed:

def item_title(self, item):    return f"{item.author_set.first().name} released {item.title}"

Any way to somehow cache the M2M relationship here?


Viewing latest article 12
Browse Latest Browse All 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>