From fb19354a019061d9dcd9018dd9d2e4b2be4b4a6b Mon Sep 17 00:00:00 2001
From: Stefano Alberto Russo <stefano.russo@gmail.com>
Date: Thu, 24 Mar 2022 18:20:07 +0100
Subject: [PATCH] Added info about Django admin, shella nd how to create the
 superuser.

---
 README.md | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 16f647b..a8d978d 100644
--- a/README.md
+++ b/README.md
@@ -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
-- 
GitLab