I am trying to publish an ICS feed using Django + vobject. As a test run, I have defined the following views:
def ical (request, user_id = none): cal = vobject.iCalendar () cal.add ('method') value = Cal.add ('calscale'). Value 'published' = 'Gregorian' cal.add ('x-wr-calname'). Value = 'TestCal28' cal.add ('x-wr-time zone'). Value = 'Australia / Sydney' cal.add ('x-wr-caldesc'). Value = '' vevent = cal.add ('vevent') vevent.add ('dtstart'). Value = datetime.now () vevent Add ('dtend'). Value = datetime (2010, 7, 22) vevent.add ('dtstamp'). Value = datetime.now () vevent.add ('summary'). Value = "test event" icalstream = cal.serialize () response = HttpResponse (icalstream, mime type = 'text / calendar') response ['file name'] = 'response of filename.ics [' content-configuration '] = 'Attachment; File name = filename.ics' rosters.davidmck.com/ical/ To care for you should be served, so if filename.ics < / Strong>, mime type = text / calendar. So far Good
BEGIN: VCALENDAR version: 2.0 CALSCALE: Gregorian method: Published PRODID: -. // PYVOBJECT // NONSGML Version 1 // Start: VEVENT UID: 20100720T073356Z-26,389 @ Rafiki DTSTART: 20100720T173356 DTEND: 20100722T000000 DTSTAMP: 20100720T173356 Summary: Test Event End: VEVENT X-WR-CALDESC: X-WR-CALNAME: TestCal28 X-WR-time-zone: Australia / Sydney end: VCALENDAR This appears to be a more or less well-formed ICS file: Import all calendar applications, including manual uploads to Google Calendar . If you subscribe it via URL via URL, then it also works as AOK. But here's the killer: Google Calendar will not work as a subscription only if you try to add it to the URL then it just says "importing calendar from url" for eternity, sometimes a failure message (ultimately) Generates.
More disappointing, if I just put that Filename.ics and some static file service location (like) in it, it still does not work .
As far as I can tell, both locations (static and generated) are available externally. I have tried uploading ics to a different web server and to actually work So I suspect that Gokal does not like my webserver for some reason. It's driving me crazy, why can not I think?
I suspect that this will solve your problem (server configuration problem like sound), but I Feed generation will suggest to check out. It works the same way as the syndication feed structure of Dzanka Kontrib (read: well)
Comments
Post a Comment