Changes on server
- bugfixes in gcal callback - requirements txt
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
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 ):
|
||||
syncParticipationFromGoogleToLocal()
|
||||
print ( "gcalApiCallback called" )
|
||||
return redirect("/")
|
||||
onGoogleCallback()
|
||||
logger.info("Received callback from GCal - updating event participations... ")
|
||||
return HttpResponse('<h1>Callback successful</h1>')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user