Skip to content
Snippets Groups Projects
Commit fb19354a authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Added info about Django admin, shella nd how to create the superuser.

parent fff7fc5a
No related branches found
No related tags found
No related merge requests found
...@@ -68,9 +68,6 @@ View logs of a specific service ...@@ -68,9 +68,6 @@ View logs of a specific service
# esap/logs service_name # esap/logs service_name
### Building errors ### Building errors
It is common for the build process to fail with a "404 not found" error on an apt-get instrucions, as apt repositories often change their IP addresses. In such case, try: It is common for the build process to fail with a "404 not found" error on an apt-get instrucions, as apt repositories often change their IP addresses. In such case, try:
...@@ -78,3 +75,25 @@ It is common for the build process to fail with a "404 not found" error on an ap ...@@ -78,3 +75,25 @@ It is common for the build process to fail with a "404 not found" error on an ap
$ esap/build nocache $ esap/build nocache
### Django Admin
Connect directly to the api-gateway service:
http://localhost:8000/esap-api/admin/
### Django Shell
$ esap/shell api-gateway "cd /opt/esap-api-gateway/esap && python3 manage.py shell --settings=esap.settings.dev"
### Create Django Superuser
From the Django shell:
>>> from django.contrib.auth.models import User
>>> user = User.objects.create_user('admin', password='admin')
>>> user.is_admin = True
>>> user.is_superuser = True
>>> user.is_staff = True
>>> user.save()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment