blechreiz-website/eventplanner_gcal/management/commands/gcal_sync.py

11 lines
419 B
Python
Raw Normal View History

from django.core.management.base import NoArgsCommand
2014-04-26 11:17:10 +02:00
from eventplanner_gcal.google_sync import syncFromLocalToGoogle
class Command(NoArgsCommand):
help = 'Synchronize Google Calendar with locally stored Events'
def handle_noargs(self, **options):
print ( "Running Sync")
2014-04-26 11:17:10 +02:00
created, deleted = syncFromLocalToGoogle()
print ( "Created %d and deleted %d events" % (created,deleted) )