Prepare for Netbox 4.0

This commit is contained in:
Tobias Genannt
2024-03-28 10:39:51 +01:00
parent eb59ace74c
commit e141d9f16d
4 changed files with 2 additions and 14 deletions

View File

@ -72,10 +72,9 @@ else
fi
./manage.py shell --interface python <<END
from django.contrib.auth.models import User
from users.models import Token
from users.models import Token, User
if not User.objects.filter(username='${SUPERUSER_NAME}'):
u=User.objects.create_superuser('${SUPERUSER_NAME}', '${SUPERUSER_EMAIL}', '${SUPERUSER_PASSWORD}')
u = User.objects.create_superuser('${SUPERUSER_NAME}', '${SUPERUSER_EMAIL}', '${SUPERUSER_PASSWORD}')
Token.objects.create(user=u, key='${SUPERUSER_API_TOKEN}')
END