From c4ebd8a7dd85a91470a73e5b0095b52df9574917 Mon Sep 17 00:00:00 2001 From: Owen Easter Date: Sun, 8 Oct 2023 23:19:31 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20[AUTO]=201.2.19=202023-10-08=202?= =?UTF-8?q?3:19:27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/library/client.py | 11 ++++++----- core/tools/commands/django/server.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/library/client.py b/core/library/client.py index 2f02ff17..f8992dff 100644 --- a/core/library/client.py +++ b/core/library/client.py @@ -97,7 +97,7 @@ class WebClient(): # Client.is_native is an non-overridable variable which indicates weather or not # this client is a react-native based client or not. - is_native:bool = True + is_native:bool = False def __init__(self): # User setup dependent options @@ -108,10 +108,11 @@ def __init__(self): self.IS_INDEX = self.ENDPOINT == '' # Generate production environment file with open(self.ENV, 'w') as prd_env: - prd_env.write(self._env(prd=True)) - # Generate development environment file - with open(self.ENV + '.dev', 'w') as dev_env: - dev_env.write(self._env(prd=False)) + prd_env.write(self._env(prd=True if not self.is_native else not settings.DEBUG)) + if not self.is_native: + # Generate development environment file + with open(self.ENV + '.dev', 'w') as dev_env: + dev_env.write(self._env(prd=False)) # Build the url structure self.URL = self._url() self.URLS = self.__urls__() if callable(self.__urls__) else None diff --git a/core/tools/commands/django/server.py b/core/tools/commands/django/server.py index c3c1d3f0..3f3d891e 100644 --- a/core/tools/commands/django/server.py +++ b/core/tools/commands/django/server.py @@ -33,7 +33,7 @@ def _server(start:bool = True, migrate:bool = False, collectstatic:bool = False) call_command('collectstatic', '--noinput', '-i admin') if start: - system(f"cd {BASE_DIR} && {sys.executable} core.py runserver localhost:{SECRET_DATA['LOCAL_PORT']}") + system(f"cd {BASE_DIR} && {sys.executable} core.py runserver 0.0.0.0:{SECRET_DATA['LOCAL_PORT']}") # Server database migration shortcut