12 lines
413 B
Python
12 lines
413 B
Python
from django.core.management.base import BaseCommand
|
|
|
|
from planner.services.fasting_notifications import notify_fasting_phase_changes
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Send ntfy notifications for fasting and eating phase changes.'
|
|
|
|
def handle(self, *args, **options):
|
|
delivered = notify_fasting_phase_changes()
|
|
self.stdout.write(f'Delivered {delivered} fasting phase notification(s).')
|