diff options
author | Alban Gruin | 2017-11-06 08:26:46 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-06 08:26:46 +0100 |
commit | 60b2ceaa43d01e34514f3e68f45585619807d1cf (patch) | |
tree | cf8763dfd9bbbe48a5383a5f49ca07437916c7a6 /feeds.py | |
parent | 771f4ebb8f1e27212bfce413ea664a73c7a86965 (diff) | |
parent | 37a95855076035470e7484804ed48b779ed22277 (diff) |
Merge branch 'dev/alban'
Diffstat (limited to 'feeds.py')
-rw-r--r-- | feeds.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -75,6 +75,11 @@ class IcalFeed(Feed): def item_link(self, item): return "" + def item_summary(self, item): + if item.type is not None: + return item.name + " (" + item.type + ")" + return item.name + def items(self, obj): return Course.objects.get_courses_for_group(obj) @@ -83,7 +88,7 @@ class IcalFeed(Feed): "dtstart": item.begin, "dtend": item.end, "dtstamp": item.last_update, - "summary": item.name + " (" + item.type + ")", + "summary": self.item_summary(item), "location": format_rooms(item.rooms.all())} |