Generate ical description dynamically

Use method instead of class attribute for ical feed description.
This allows the class to be instantiated without a database being
available (eg. during migrate).
This commit is contained in:
Joel Addison 2017-01-29 22:08:49 +10:00
parent 37dd7dd15b
commit 155f841afa

View file

@ -270,7 +270,8 @@ class EventFeed(ICalFeed):
product_id = '-//linux.conf.au/schedule//EN'
timezone = settings.TIME_ZONE
filename = 'conference.ics'
description = Conference.objects.all().first().title
def description(self):
return Conference.objects.all().first().title
def items(self):
return Slot.objects.filter(