add 5 users for test
This commit is contained in:
parent
4bda5abd64
commit
e6fddbf956
|
@ -23,11 +23,12 @@ class Command(BaseCommand):
|
||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
ADMIN_EMAIL = config('ADMIN_EMAIL', 'admin@example.org')
|
ADMIN_EMAIL = config('ADMIN_EMAIL', 'admin@example.org')
|
||||||
ADMIN_PASSWORD = config('ADMIN_PASSWORD', '1234')
|
ADMIN_PASSWORD = config('ADMIN_PASSWORD', '1234')
|
||||||
USER_EMAIL = config('USER_EMAIL', 'user1@example.org')
|
|
||||||
USER_PASSWORD = config('USER_PASSWORD', '1234')
|
|
||||||
|
|
||||||
self.create_admin_users(ADMIN_EMAIL, ADMIN_PASSWORD)
|
self.create_admin_users(ADMIN_EMAIL, ADMIN_PASSWORD)
|
||||||
self.create_users(USER_EMAIL, USER_PASSWORD)
|
if settings.CREATE_TEST_USERS:
|
||||||
|
for u in range(1, 6):
|
||||||
|
user = 'user{}@example.org'.format(u)
|
||||||
|
self.create_users(user, '1234')
|
||||||
|
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent.parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent.parent
|
||||||
ORGANIZATION = os.path.join(BASE_DIR, settings.ORG_FILE)
|
ORGANIZATION = os.path.join(BASE_DIR, settings.ORG_FILE)
|
||||||
|
|
Loading…
Reference in New Issue