Update README
Add information about migrate and admin right on local dev
This commit is contained in:
parent
c7ddf8a435
commit
3829ad11ef
12
README.md
12
README.md
|
@ -28,5 +28,15 @@ DEBUG = True
|
||||||
SECRET_KEY = 'what you want'
|
SECRET_KEY = 'what you want'
|
||||||
```
|
```
|
||||||
|
|
||||||
When you'll run `python manage.py runserver`, an empty database will be automatically created.
|
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.
|
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()
|
||||||
|
```
|
Loading…
Reference in New Issue