diff --git a/vre-panel/.env b/vre-panel/.env index 0a5efa4..d939fee 100644 --- a/vre-panel/.env +++ b/vre-panel/.env @@ -1,2 +1,2 @@ -API_BASE_PATH=/vre-api-test/api +API_BASE_PATH=/vre-api/api FRONTEND_BASE_PATH=/vreapp diff --git a/vre-panel/pages/auth/signin.tsx b/vre-panel/pages/auth/signin.tsx index 1b85262..48d0c75 100644 --- a/vre-panel/pages/auth/signin.tsx +++ b/vre-panel/pages/auth/signin.tsx @@ -35,7 +35,7 @@ export async function getServerSideProps(context: { req: any; }) { redirect: { destination: '/' }, }; } - console.log("providers", providers) + console.log("providers: ", providers) return { props: { providers }, } diff --git a/vreapis/virtual_labs/management/commands/check_or_create_admin.py b/vreapis/virtual_labs/management/commands/check_or_create_admin.py index c5dc134..e0af74c 100644 --- a/vreapis/virtual_labs/management/commands/check_or_create_admin.py +++ b/vreapis/virtual_labs/management/commands/check_or_create_admin.py @@ -2,23 +2,21 @@ from django.core.management.base import BaseCommand import os -class Command(BaseCommand): +class Command(BaseCommand): help = "Creates an admin user non-interactively if it doesn't exist" def add_arguments(self, parser): - parser.add_argument('--username', help="Admin's username") - parser.add_argument('--email', help="Admin's email") + parser.add_argument('--username', help="Admin's username") + parser.add_argument('--email', help="Admin's email") def handle(self, *args, **options): - - password = os.environ.get("DJANGO_SUPERUSER_PASSWORD", default="") + password = os.environ.get("DJANGO_SUPERUSER_PASSWORD", default="change_me_please") self.stdout.write(f"Admin password from ENV {password}") User = get_user_model() if not User.objects.filter(username=options['username']).exists(): self.stdout.write(f"Admin user {options['username']} not present, creating it ...") - user= User.objects.create_superuser(username=options['username'], email=options['email']) + user = User.objects.create_superuser(username=options['username'], email=options['email']) user.set_password(password) user.save() self.stdout.write(f"Admin user {options['username']} created!") -