mirror of https://github.com/snachodog/mybuddy.git
1.8 KiB
1.8 KiB
Managing Users
Creating a User
Changing User Settings
Changing User Password
Creating a User from the Command Line
A user's type can be:
- Read only (can access all data but not make new entries)
- Standard (default, can access and make/edit any type of entry)
- Staff (bypasses permissions, can access Database Admin area)
There are 2 ways you can create a user from the command line:
- Passing user's password as an argument:
python manage.py createuser --username <username> --password <password>
This will create a user with the standard privileges.
- Interactively setting user's password:
python manage.py createuser --username <username>
You will then be prompted to enter and confirm a password.
- If you want to create a user with read only privileges, pass in the
read_only
value to thegroup
arg:
python manage.py createuser --username <username> --password <password> --group read_only
- If you want to create a user with the highest level of permission, you can append the
--is-staff
argument:
python manage.py createuser --username <username> --is-staff
- Another argument you can use with this command is
--email
python manage.py createuser --username <username> --email <email>
- To get a list of supported commands:
python manage.py createuser --help