I am trying to write an ICS feed using django + vobject. Like a test run, I've the next view defined:

def ical(request, user_id=None):
    cal = vobject.iCalendar()
    cal.add('method').value = 'PUBLISH'
    cal.add('calscale').value = 'GREGORIAN'
    cal.add('x-wr-calname').value = 'TestCal28'
    cal.add('x-wr-timezone').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, mimetype='text/calendar')
    response['Filename'] = 'filename.ics'
    response['Content-Disposition'] = 'attachment; filename=filename.ics'

if you care to visit rosters.davidmck.com/ical/ you need to get offered filename.ics, mimetype = text/calendar. To date so great.

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
PRODID:-//PYVOBJECT//NONSGML Version 1//EN
BEGIN:VEVENT
UID:20100720T073356Z-26389@Rafiki
DTSTART:20100720T173356
DTEND:20100722T000000
DTSTAMP:20100720T173356
SUMMARY:Test event
END:VEVENT
X-WR-CALDESC:
X-WR-CALNAME:TestCal28
X-WR-TIMEZONE:Australia/Sydney
END:VCALENDAR

This appears to become a more-or-less well created ICS file: it'll import to every calendaring application that I have attempted, including manual upload to google calendar. Should you sign up for it via URL using Yahoo, it appears to operate A-Perfectly acceptable. But here's the killer: Google Calendar just will not act as a regular membership. Should you make an effort to add it by Hyperlink to goocal it simply states "Posting Calendar from URL" to have an eternity, sometimes producing failing message (eventually).

More frustrating, basically simply take that filename.ics and set it in certain static file serving location (like http://rosters.davidmck.com/site_media/filename.ics), still it does not work.

So far as I will tell, both location (static and produced) are externally available. I have also attempted just uploading the ics to another web server and that really appeared to operate and so i suspect Goocal does not like my webserver for whatever reason. It's driving me crazy, I can not think why.

I doubt this can solve your condition (seems like a server configuration problem), but I recommend looking at django-cal for the feed generation. It really works exactly the same way as django.contrib's distribution feed framework (read: nicely)