Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix manage.py initialize command #3466

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions hypha/core/management/commands/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def handle(self, *args, **options):
APPLY_SITE_DOMAIN = click.prompt("Domain of apply site ", default="apply.hypha.test")
SUPER_ADMIN_EMAIL = click.prompt("Superadmin Email ", default="superadmin@hypha.test")
SUPER_ADMIN_PASSWORD = click.prompt("Superadmin Password ", default="hypha123")
SITE_PORT = click.prompt("Site port", default="8090")
SITE_PORT = click.prompt("Site port", default="9001")

User = get_user_model()

Expand All @@ -34,13 +34,13 @@ def handle(self, *args, **options):

# Set site port and domain
click.secho(f">>> Set public site to {PUBLIC_SITE_DOMAIN}:{SITE_PORT}", fg="green")
site_apply = Site.objects.get(id=2)
site_apply.hostname = PUBLIC_SITE_DOMAIN
site_apply.port = SITE_PORT
site_apply.save()

click.secho(f">>> Set apply site to {APPLY_SITE_DOMAIN}:{SITE_PORT}", fg="green")
site_public = Site.objects.get(id=3)
site_public.hostname = APPLY_SITE_DOMAIN
site_public = Site.objects.get(id=2)
site_public.hostname = PUBLIC_SITE_DOMAIN
site_public.port = SITE_PORT
site_public.save()

click.secho(f">>> Set apply site to {APPLY_SITE_DOMAIN}:{SITE_PORT}", fg="green")
site_apply = Site.objects.get(id=3)
site_apply.hostname = APPLY_SITE_DOMAIN
site_apply.port = SITE_PORT
site_apply.save()
Loading