Changes on server

- bugfixes in gcal callback
- requirements txt
This commit is contained in:
Martin Bauer
2014-04-21 09:21:59 +02:00
parent aac687c0c7
commit 46b4078fac
9 changed files with 84 additions and 56 deletions

View File

@@ -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>')