port to new django, AI automated

This commit is contained in:
2026-03-30 22:35:36 +02:00
parent e2d166e437
commit 372da3caa9
215 changed files with 9283 additions and 2981 deletions

View File

@@ -1,11 +1,9 @@
from django.core.management.base import NoArgsCommand
from eventplanner_gcal.google_sync import check_gcal_subscription
from eventplanner_gcal.google_sync import checkGCalSubscription
class Command(NoArgsCommand):
help = 'Checks if the GCal notification channel is still active'
def handle_noargs(self, **options):
print("Checking Subscription")
check_gcal_subscription()
print ( "Checking Subscription")
checkGCalSubscription()

View File

@@ -1,11 +1,9 @@
from django.core.management.base import NoArgsCommand
from eventplanner_gcal.google_sync import delete_all_gcal_events
from eventplanner_gcal.google_sync import deleteAllGCalEvents
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.")
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,))
print ("Deleting all GCal Events.")
nrOfDeletedEvents = deleteAllGCalEvents()
print ("Deleted %d events. To Restore them from local database run gcal_sync" % (nrOfDeletedEvents, ) )

View File

@@ -1,10 +1,8 @@
from django.core.management.base import NoArgsCommand
from eventplanner_gcal.google_sync import stop_all_gcal_subscriptions
from eventplanner_gcal.google_sync import stopAllGCalSubscriptions
class Command(NoArgsCommand):
help = 'Stops all GCal subscriptions'
def handle_noargs(self, **options):
stop_all_gcal_subscriptions()
stopAllGCalSubscriptions()

View File

@@ -1,11 +1,10 @@
from django.core.management.base import NoArgsCommand
from eventplanner_gcal.google_sync import sync_from_local_to_google
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 = sync_from_local_to_google()
print("Created %d and deleted %d events" % (created, deleted))
print ( "Running Sync")
created, deleted = syncFromLocalToGoogle()
print ( "Created %d and deleted %d events" % (created,deleted) )