Esempio n. 1
0
def schedule():
    # Check the media type. If it is a calendar type, then return the iCalendar
    # file.
    print('here')
    print(request.headers)
    if ICalendarRenderer.media_type in request.headers['Accept'].split(','):
        return {'data': api.schedule_events(request.args.get('semester'))}
    else:
        return render_template('schedule.html')
Esempio n. 2
0
def schedule_ical():
    return {'data': api.schedule_events(request.args.get('semester'))}