mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-09-18 05:29:37 +08:00
Generate active accounts on debug mode
This commit is contained in:
parent
73aa0f0c8a
commit
5afe6c28ab
2 changed files with 4 additions and 3 deletions
|
@ -37,8 +37,9 @@ BACKEND_CACHE_USERNAME="REPLACE-ME"
|
|||
BACKEND_CACHE_PASSWORD="REPLACE-ME"
|
||||
|
||||
# DEBUG Variables: Only used in development
|
||||
BACKEND_PASSWORD="REPLACE-ME"
|
||||
|
||||
BACKEND_DEBUG_USER_USERNAME="admin"
|
||||
BACKEND_DEBUG_USER_EMAIL="admin@test.com"
|
||||
BACKEND_DEBUG_USER_PASSWORD="REPLACE-ME"
|
||||
|
||||
# # CACHE
|
||||
CACHE_USERNAME="REPLACE-ME"
|
||||
|
|
|
@ -20,6 +20,6 @@ def generate_test_users(sender, **kwargs):
|
|||
"""
|
||||
if sender.name == "accounts" and config.DEBUG:
|
||||
try:
|
||||
users.generate_test_users()
|
||||
users.generate_test_users(active=True)
|
||||
except Exception as e:
|
||||
logger.error(f"Error creating test users post-migration: {e}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue