-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run create_superuser
to create super user on application's start
#2333
Conversation
The idea here is to run I can see the CodeQL checks are complaining, so maybe I'll drop the password printing and accept the fact that new installation will have |
Added tests to make sure the command behaves like I want. It will create the superuser account only if one doesn't exist. The existing superuser account will not be changed. When moving this code to production, we can easily create account for user |
create_superuser
to also generate random passwordcreate_superuser
to create super user on application's start
Now the user account is created with the default password, if and only if the account doesn't exist yet.
3ec557d
to
337638d
Compare
Conflict resolved. @elichad Can you review this PR? |
Is it worth creating that user now so we don't forget about it later? |
Also, I haven't looked through the new CI/CD setup yet - is the database recreated from scratch every time the test server is re-deployed, or does it persist? |
Good idea. I have just created this account on production server and disabled its permissions and access.
No, database persists. It is treated as a completely separate service from the application. |
This fixes #2310.