From f65b1caf9aff389ee2fb3200dcbef067616db043 Mon Sep 17 00:00:00 2001 From: evgeniy-st Date: Wed, 28 Aug 2019 09:49:50 +0300 Subject: [PATCH] Fix redirect settings --- apps/main/methods.py | 2 +- apps/main/models.py | 2 +- project/settings/development.py | 1 + project/settings/local.py | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/main/methods.py b/apps/main/methods.py index 99d8fc9b..3d4349e4 100644 --- a/apps/main/methods.py +++ b/apps/main/methods.py @@ -54,7 +54,7 @@ def determine_user_site_url(country_code): except Exception: return site_url(schema=settings.SCHEMA_URI, subdomain=settings.DEFAULT_SUBDOMAIN, - domain=settings.DOMAIN_URI) + domain=settings.SITE_DOMAIN_URI) else: return site.site_url diff --git a/apps/main/models.py b/apps/main/models.py index 5b41d75b..4f42e019 100644 --- a/apps/main/models.py +++ b/apps/main/models.py @@ -141,7 +141,7 @@ class SiteSettings(ProjectBaseMixin): def site_url(self): return methods.site_url(schema=settings.SCHEMA_URI, subdomain=self.subdomain, - domain=settings.DOMAIN_URI) + domain=settings.SITE_DOMAIN_URI) class Feature(ProjectBaseMixin): diff --git a/project/settings/development.py b/project/settings/development.py index f9809cfe..8f67c38a 100644 --- a/project/settings/development.py +++ b/project/settings/development.py @@ -8,4 +8,5 @@ SMS_CODE_SHOW = True SCHEMA_URI = 'http' DEFAULT_SUBDOMAIN = 'www' +SITE_DOMAIN_URI = 'id-east.ru' DOMAIN_URI = 'gm.id-east.ru' diff --git a/project/settings/local.py b/project/settings/local.py index d05f81eb..2858973c 100644 --- a/project/settings/local.py +++ b/project/settings/local.py @@ -9,7 +9,8 @@ USE_CELERY = False SCHEMA_URI = 'http' DEFAULT_SUBDOMAIN = 'www' -DOMAIN_URI = 'testserver.com:8000' +SITE_DOMAIN_URI = 'testserver.com:8000' +DOMAIN_URI = '0.0.0.0:8000' # OTHER SETTINGS API_HOST = '0.0.0.0:8000'