From 0f951dcf029d4af284467543a3afdf5bf6581a20 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 23 Apr 2024 11:16:38 +0100 Subject: switched to Django --- engagements/management/commands/create_engagement_data.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 engagements/management/commands/create_engagement_data.py (limited to 'engagements/management') diff --git a/engagements/management/commands/create_engagement_data.py b/engagements/management/commands/create_engagement_data.py new file mode 100644 index 0000000..021d29b --- /dev/null +++ b/engagements/management/commands/create_engagement_data.py @@ -0,0 +1,14 @@ +from django.core.management.base import BaseCommand + +from engagements.utils import populate_database + + +class Command(BaseCommand): + help = "python manage.py create_engagement_data" + + # def add_arguments(self, parser): + # parser.add_argument("year", nargs="+", type=int) + + def handle(self, *args, **options): + populate_database() + self.stdout.write(self.style.SUCCESS("Created engagement objects.")) -- cgit v1.2.3