eventplanner_gcal: PEP coding style
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
|
||||
from eventplanner_gcal.google_sync import checkGCalSubscription
|
||||
from eventplanner_gcal.google_sync import check_gcal_subscription
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Checks if the GCal notification channel is still active'
|
||||
|
||||
def handle_noargs(self, **options):
|
||||
print ( "Checking Subscription")
|
||||
checkGCalSubscription()
|
||||
print("Checking Subscription")
|
||||
check_gcal_subscription()
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
from eventplanner_gcal.google_sync import deleteAllGCalEvents
|
||||
from eventplanner_gcal.google_sync import delete_all_gcal_events
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Delete all events in the google calendar created by this app'
|
||||
|
||||
def handle_noargs(self, **options):
|
||||
print ("Deleting all GCal Events.")
|
||||
nrOfDeletedEvents = deleteAllGCalEvents()
|
||||
print ("Deleted %d events. To Restore them from local database run gcal_sync" % (nrOfDeletedEvents, ) )
|
||||
print("Deleting all GCal Events.")
|
||||
nr_of_deleted_events = delete_all_gcal_events()
|
||||
print("Deleted %d events. To Restore them from local database run gcal_sync" % (nr_of_deleted_events,))
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
|
||||
from eventplanner_gcal.google_sync import stopAllGCalSubscriptions
|
||||
from eventplanner_gcal.google_sync import stop_all_gcal_subscriptions
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Stops all GCal subscriptions'
|
||||
|
||||
def handle_noargs(self, **options):
|
||||
stopAllGCalSubscriptions()
|
||||
stop_all_gcal_subscriptions()
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
|
||||
from eventplanner_gcal.google_sync import syncFromLocalToGoogle
|
||||
from eventplanner_gcal.google_sync import sync_from_local_to_google
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
help = 'Synchronize Google Calendar with locally stored Events'
|
||||
|
||||
def handle_noargs(self, **options):
|
||||
print ( "Running Sync")
|
||||
created, deleted = syncFromLocalToGoogle()
|
||||
print ( "Created %d and deleted %d events" % (created,deleted) )
|
||||
print("Running Sync")
|
||||
created, deleted = sync_from_local_to_google()
|
||||
print("Created %d and deleted %d events" % (created, deleted))
|
||||
|
||||
Reference in New Issue
Block a user