Extend docs with superuser

This commit is contained in:
Chris Nagy
2021-04-10 13:47:31 +02:00
parent e3ba968fef
commit 0cc32e7ed7
2 changed files with 28 additions and 1 deletions

View File

@@ -26,5 +26,8 @@ class Command(BaseCommand):
# Create superuser based on env variables
User.objects.create_superuser(PAPERLESS_ADMIN_USER, PAPERLESS_ADMIN_MAIL, PAPERLESS_ADMIN_PASSWORD)
self.stdout.write(f'Created superuser "{PAPERLESS_ADMIN_USER}" with provided password.')
else:
self.stdout.write(f'Did not create superuser "{PAPERLESS_ADMIN_USER}".')
self.stdout.write('Make sure you specified "PAPERLESS_ADMIN_PASSWORD" in your "docker-compose.env" file.')
except Exception as error:
self.stdout.write(f'Exception occured while managing superuser: {error}')
self.stdout.write(f'Exception occured while creating superuser: {error}')