from django.shortcuts import redirect from eventplanner_gcal.models import syncGCalEvents, syncParticipationFromGoogleToLocal from eventplanner_gcal.signals import onGoogleCallback from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import logging logger = logging.getLogger( __name__ ) def runSync( request ): syncGCalEvents() return redirect("/") @csrf_exempt def gcalApiCallback( request ): onGoogleCallback() logger.info("Received callback from GCal - updating event participations... ") return HttpResponse('