aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--feeds.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/feeds.py b/feeds.py
index 2dd2479..a75e60b 100644
--- a/feeds.py
+++ b/feeds.py
@@ -27,7 +27,7 @@ from .models import Course, Group, LastUpdate
from .templatetags.rooms import format_rooms
from .utils import get_current_or_next_week, get_week, group_courses
-ICAL_NAMES = ["summary", "description", "location", "start", "dtstart", "dtend"]
+ICAL_NAMES = ["uid", "summary", "description", "location", "start", "dtstart", "dtend"]
class IcalFeedGenerator(SyndicationFeed):
@@ -35,6 +35,7 @@ class IcalFeedGenerator(SyndicationFeed):
def write(self, outfile, encoding):
calendar = Calendar()
+ calendar.add("prodid", "-//celcatsanitizer//NONSGML v1.0//EN")
calendar.add("version", "2.0")
self.write_events(calendar)
@@ -71,7 +72,8 @@ class IcalFeed(Feed):
return Course.objects.get_courses_for_group(obj).order_by("begin")
def item_extra_kwargs(self, item):
- return {"dtstart": item.begin,
+ return {"uid": "{0}@celcatsanitizer".format(item.id),
+ "dtstart": item.begin,
"dtend": item.end,
"summary": item.name,
"location": format_rooms(item.rooms.all())}