2014-03-09 18:13:30 +01:00
|
|
|
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
|
|
|
|
|
2014-03-09 18:13:30 +01:00
|
|
|
|
|
|
|
class Command(NoArgsCommand):
|
|
|
|
help = 'Synchronize Google Calendar with locally stored Events'
|
2019-01-05 13:04:20 +01:00
|
|
|
|
2014-03-09 18:13:30 +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))
|