Features: 1) Centralize use of BASE_DOMAIN to replace CONSTANCE_CONFIG in API URLs.
Fixes: 1) Add missing import for `BASE_DOMAIN` in `drf.py`. Extra: 1) Minor cleanup by removing redundant imports in `jazzmin.py`.
This commit is contained in:
parent
73138c3911
commit
da2403c3c5
2 changed files with 4 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ from os import getenv
|
||||||
|
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
from evibes.settings import BASE_DOMAIN
|
||||||
from evibes.settings.base import DEBUG, EVIBES_VERSION, SECRET_KEY
|
from evibes.settings.base import DEBUG, EVIBES_VERSION, SECRET_KEY
|
||||||
from evibes.settings.constance import CONSTANCE_CONFIG
|
from evibes.settings.constance import CONSTANCE_CONFIG
|
||||||
|
|
||||||
|
|
@ -136,7 +137,7 @@ SPECTACULAR_SETTINGS = {
|
||||||
},
|
},
|
||||||
"SERVERS": [
|
"SERVERS": [
|
||||||
{
|
{
|
||||||
"url": f"https://api.{CONSTANCE_CONFIG.get('BASE_DOMAIN')[0]}/", # type: ignore [index]
|
"url": f"https://api.{BASE_DOMAIN}/", # type: ignore [index]
|
||||||
"description": "Production Server",
|
"description": "Production Server",
|
||||||
},
|
},
|
||||||
{"url": "http://api.localhost:8000/", "description": "Development Server"},
|
{"url": "http://api.localhost:8000/", "description": "Development Server"},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from evibes.settings import BASE_DOMAIN, STOREFRONT_DOMAIN
|
from evibes.settings.base import EVIBES_VERSION, BASE_DOMAIN, STOREFRONT_DOMAIN
|
||||||
from evibes.settings.base import EVIBES_VERSION
|
|
||||||
from evibes.settings.constance import CONSTANCE_CONFIG
|
from evibes.settings.constance import CONSTANCE_CONFIG
|
||||||
|
|
||||||
JAZZMIN_SETTINGS = {
|
JAZZMIN_SETTINGS = {
|
||||||
|
|
@ -28,7 +27,7 @@ JAZZMIN_SETTINGS = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": _("REST Docs"),
|
"name": _("REST Docs"),
|
||||||
"url": f"https://api.{CONSTANCE_CONFIG.get('BASE_DOMAIN')[0]}/docs/swagger", # type: ignore [index]
|
"url": f"https://api.{BASE_DOMAIN}/docs/swagger", # type: ignore [index]
|
||||||
"new_window": True,
|
"new_window": True,
|
||||||
},
|
},
|
||||||
{"name": _("Support"), "url": "https://t.me/fureunoir", "new_window": True},
|
{"name": _("Support"), "url": "https://t.me/fureunoir", "new_window": True},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue