Refactored google calendar sync
This commit is contained in:
committed by
Martin Bauer
parent
46b4078fac
commit
1aa23d2691
@@ -1,6 +1,6 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
|
||||
from eventplanner_gcal.signals import checkGCalSubscription
|
||||
from eventplanner_gcal.google_sync import checkGCalSubscription
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Checks if the GCal notification channel is still active'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
from eventplanner_gcal.signals import deleteAllGCalEvents
|
||||
from eventplanner_gcal.google_sync import deleteAllGCalEvents
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Delete all events in the google calendar created by this app'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
|
||||
from eventplanner_gcal.signals import stopAllGCalSubscriptions
|
||||
from eventplanner_gcal.google_sync import stopAllGCalSubscriptions
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Stops all GCal subscriptions'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
|
||||
from eventplanner_gcal.signals import syncGCalEvents
|
||||
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")
|
||||
created, deleted = syncGCalEvents()
|
||||
created, deleted = syncFromLocalToGoogle()
|
||||
print ( "Created %d and deleted %d events" % (created,deleted) )
|
||||
|
||||
Reference in New Issue
Block a user