Browse Source

create command init_test_users

blezz-tech 1 month ago
parent
commit
7987d5d127
1 changed files with 14 additions and 0 deletions
  1. 14 0
      management/commands/init_test_users.py

+ 14 - 0
management/commands/init_test_users.py

@@ -0,0 +1,14 @@
+from django.core.management.base import BaseCommand
+
+from dbsynce.lib.seed import create_test_users
+
+class Command(BaseCommand):
+    help = "My shiny new management command."
+
+    def handle(self, *args, **options):
+        self.stdout.write(self.style.SUCCESS('Start seeding'))
+
+        create_test_users()
+
+        self.stdout.write(self.style.SUCCESS('Successful seeding'))
+        # raise NotImplementedError()