Example #1
0
def complete_ical(request, number=0):
    events = Event.future.get_n(long(number) if number != '' else 0)

    if not number:
        events = events.reverse()

    calendar = create_calendar([x.get_icalendar_event() for x in events])
    return HttpResponse(calendar.to_ical(), mimetype='text/calendar; charset=utf-8')
Example #2
0
File: views.py Project: jaeh/mos
def complete_ical(request, number=0):
    events = Event.future.get_n(long(number) if number != '' else 0)

    if not number:
        events = events.reverse()

    calendar = create_calendar([x.get_icalendar_event() for x in events])
    return HttpResponse(calendar.to_ical(),
                        mimetype='text/calendar; charset=utf-8')
Example #3
0
File: models.py Project: jaeh/mos
 def get_icalendar(self):
     return create_calendar([self.get_icalendar_event()])