Update README

Better solution to create superuser admin
This commit is contained in:
Starthur 2022-02-16 14:33:21 +01:00
parent b9704d3cb3
commit 28d8874272
1 changed files with 1 additions and 9 deletions

View File

@ -31,12 +31,4 @@ SECRET_KEY = 'what you want'
When you'll run `python manage.py migrate` then `python manage.py runserver`, an empty database will be automatically created.
The `local_settings.py` is in the `.gitignore` and should stay that way, so we don't accidentally overwrite the production file when we deploy.
To obtain administrator rights you must create a user on the platform. Then you can run `python manage.py shell` and type the following commands:
```
from django.contrib.auth.models import User
user = User.objects.get(username="<your_username>")
user.is_staff = True
user.is_admin = True
user.is_superuser = True
user.save()
```
To obtain administrator rights you can run `python manage.py createsuperuser`.