mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 01:40:52 +00:00
perf: lang setting from core
This commit is contained in:
@@ -3,7 +3,7 @@ from rest_framework import generics
|
||||
from rest_framework.permissions import AllowAny
|
||||
|
||||
from authentication.permissions import IsValidUserOrConnectionToken
|
||||
from common.const.choices import COUNTRY_CALLING_CODES
|
||||
from common.const.choices import COUNTRY_CALLING_CODES, Language
|
||||
from common.utils import get_logger, lazyproperty
|
||||
from common.utils.timezone import local_now
|
||||
from .. import serializers
|
||||
@@ -26,7 +26,14 @@ class OpenPublicSettingApi(generics.RetrieveAPIView):
|
||||
return {
|
||||
"XPACK_ENABLED": settings.XPACK_ENABLED,
|
||||
"INTERFACE": self.interface_setting,
|
||||
"COUNTRY_CALLING_CODES": COUNTRY_CALLING_CODES
|
||||
"COUNTRY_CALLING_CODES": COUNTRY_CALLING_CODES,
|
||||
"LANGUAGES": [
|
||||
{
|
||||
'name': title,
|
||||
'code': code
|
||||
}
|
||||
for code, title in Language.choices
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user