2014-03-09 18:13:30 +01:00
|
|
|
from django.core.management.base import NoArgsCommand
|
2014-04-26 11:17:10 +02:00
|
|
|
from eventplanner_gcal.google_sync import deleteAllGCalEvents
|
2014-03-09 18:13:30 +01:00
|
|
|
|
|
|
|
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, ) )
|