소스 검색

create command init_test_users

blezz-tech 1 개월 전
부모
커밋
7987d5d127
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  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()