Debug output for google sync
This commit is contained in:
@@ -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>')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user