Debug output for google sync

This commit is contained in:
Martin Bauer
2014-06-17 23:42:18 +02:00
parent 1aa23d2691
commit 5fc206112d
2 changed files with 10 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ from django.shortcuts import redirect
from eventplanner_gcal.google_sync import syncFromGoogleToLocal, syncFromLocalToGoogle
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from pprint import pformat
import logging
@@ -14,8 +15,11 @@ def runSync( request ):
@csrf_exempt
def gcalApiCallback( request ):
syncFromGoogleToLocal()
logger.info("Received callback from GCal - updating event participations... ")
# TODO check channel info here
requestMetaStr = pformat( request.META )
logger.info( "Received Google Callback with the following headers:\n" + requestMetaStr )
result = syncFromGoogleToLocal()
logger.info("Finished processing callback from GCal - New Information present: %1 " %(result, ) )
return HttpResponse('<h1>Callback successful</h1>')