Require password change on initial user after installation

This commit is contained in:
Raphael Michel
2023-10-23 09:42:04 +02:00
parent 126fe34005
commit 3a2655e57d

View File

@@ -10,6 +10,7 @@ def initial_user(apps, schema_editor):
user = User(email='admin@localhost')
user.is_staff = True
user.is_superuser = True
user.needs_password_change = True
user.password = make_password('admin')
user.save()