Example #1
0
def viewCal():
    gcal = GCal()
    id1 = gcal.get_tempID()
    oldEvents = gcal.get_events(calendar='temp', daysPast=2, daysFuture=7)
    gcal.delete_multiple('main', oldEvents)
    if request.method == 'GET':
        sciPyLAS.run()
        tempList = gcal.get_events(calendar='temp', daysPast=0, daysFuture=7)
    if request.method == 'POST':
        gcal.migrate_events()
        for i in tempList:
            ID = i.name
            try:
                temp = request.form[ID]
                gcal.delete_event('temp', ID)
            except:
                pass

    return render_template('viewCal.html', id1=id1, tempList=tempList)