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
Loading
Loading
Loading
Loading
+22 −3
Original line number Diff line number Diff line
@@ -68,9 +68,6 @@ View logs of a specific service
    # esap/logs service_name





### 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:
@@ -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


### 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