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

13 lines
421 B
Python
Raw Normal View History

from django.core.management.base import NoArgsCommand
2019-01-05 13:04:20 +01:00
from eventplanner_gcal.google_sync import sync_from_local_to_google
class Command(NoArgsCommand):
help = 'Synchronize Google Calendar with locally stored Events'
2019-01-05 13:04:20 +01:00
def handle_noargs(self, **options):
2019-01-05 13:04:20 +01:00
print("Running Sync")
created, deleted = sync_from_local_to_google()
print("Created %d and deleted %d events" % (created, deleted))