GCal Mapping: Management commands and signals

This commit is contained in:
Martin Bauer
2014-03-09 18:13:30 +01:00
parent ee37a5ddcb
commit 751bb2130d
6 changed files with 101 additions and 26 deletions

View File

@@ -0,0 +1,10 @@
from django.core.management.base import NoArgsCommand
from eventplanner_gcal.models import syncGCalEvents
class Command(NoArgsCommand):
help = 'Synchronize Google Calendar with locally stored Events'
def handle_noargs(self, **options):
print ( "Running Sync")
created, deleted = syncGCalEvents()
print ( "Created %d and deleted %d events" % (created,deleted) )