ecodev-core 0.0.59__py3-none-any.whl → 0.0.61__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ecodev-core might be problematic. Click here for more details.
- ecodev_core/__init__.py +1 -1
- ecodev_core/db_i18n.py +1 -3
- {ecodev_core-0.0.59.dist-info → ecodev_core-0.0.61.dist-info}/METADATA +1 -1
- {ecodev_core-0.0.59.dist-info → ecodev_core-0.0.61.dist-info}/RECORD +6 -6
- {ecodev_core-0.0.59.dist-info → ecodev_core-0.0.61.dist-info}/LICENSE.md +0 -0
- {ecodev_core-0.0.59.dist-info → ecodev_core-0.0.61.dist-info}/WHEEL +0 -0
ecodev_core/__init__.py
CHANGED
|
@@ -37,9 +37,9 @@ from ecodev_core.db_connection import engine
|
|
|
37
37
|
from ecodev_core.db_connection import get_session
|
|
38
38
|
from ecodev_core.db_connection import info_message
|
|
39
39
|
from ecodev_core.db_filters import ServerSideFilter
|
|
40
|
+
from ecodev_core.db_i18n import get_lang
|
|
40
41
|
from ecodev_core.db_i18n import I18nMixin
|
|
41
42
|
from ecodev_core.db_i18n import Lang
|
|
42
|
-
from ecodev_core.db_i18n import get_lang
|
|
43
43
|
from ecodev_core.db_i18n import localized_col
|
|
44
44
|
from ecodev_core.db_i18n import set_lang
|
|
45
45
|
from ecodev_core.db_insertion import generic_insertion
|
ecodev_core/db_i18n.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Module implementing internationalization (i18n) for sqlmodel
|
|
3
3
|
"""
|
|
4
|
-
|
|
5
4
|
import contextvars
|
|
6
5
|
from enum import Enum
|
|
7
6
|
from typing import Optional
|
|
@@ -11,7 +10,6 @@ from sqlalchemy import label
|
|
|
11
10
|
from sqlmodel import func
|
|
12
11
|
from sqlmodel.main import SQLModelMetaclass
|
|
13
12
|
|
|
14
|
-
from ecodev_core.list_utils import first_func_or_default
|
|
15
13
|
|
|
16
14
|
class Lang(str, Enum):
|
|
17
15
|
"""
|
|
@@ -106,7 +104,7 @@ class I18nMixin:
|
|
|
106
104
|
if lang not in cls.__localized_fields__[field]:
|
|
107
105
|
raise AttributeError(f'Field {field!r} is not localized to {lang!r}')
|
|
108
106
|
|
|
109
|
-
return
|
|
107
|
+
return [lang] if cls.__fallback_lang__ == lang else [lang, cls.__fallback_lang__]
|
|
110
108
|
|
|
111
109
|
@classmethod
|
|
112
110
|
def _get_localized_field_name(cls, field: str, lang: Lang) -> str:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
ecodev_core/__init__.py,sha256=
|
|
1
|
+
ecodev_core/__init__.py,sha256=KkXNOayUlBWog-V_uoAq5oi2mXvrjdWOlirEj09zCU4,6633
|
|
2
2
|
ecodev_core/app_activity.py,sha256=KBtI-35LBLPDppFB7xjxWthXQrY3Z_aGDnC-HrW8Ea0,4641
|
|
3
3
|
ecodev_core/app_rights.py,sha256=RZPdDtydFqc_nFj96huKAc56BS0qS6ScKv4Kghqd6lc,726
|
|
4
4
|
ecodev_core/app_user.py,sha256=r1bqA4H08x53XmxmjwyGKl_PFjYQazzBbVErdkztqeE,2947
|
|
@@ -9,7 +9,7 @@ ecodev_core/check_dependencies.py,sha256=aFn8GI4eBbuJT8RxsfhSSnlpNYYj_LPOH-tZF0E
|
|
|
9
9
|
ecodev_core/custom_equal.py,sha256=2gRn0qpyJ8-Kw9GQSueu0nLngLrRrwyMPlP6zqPac0U,899
|
|
10
10
|
ecodev_core/db_connection.py,sha256=scur99ohLM4Mt931-1RAQh8b6YqFyyMMFkzz8eCxdik,2589
|
|
11
11
|
ecodev_core/db_filters.py,sha256=T_5JVF27UEu7sC6NOm7-W3_Y0GLfbWQO_EeTXcD2cv8,5041
|
|
12
|
-
ecodev_core/db_i18n.py,sha256=
|
|
12
|
+
ecodev_core/db_i18n.py,sha256=P8GWfdBtXTloVjeW6K2_F-VsXUMyQWcE2-F736w8gvM,8305
|
|
13
13
|
ecodev_core/db_insertion.py,sha256=k-r798MMrW1sRb-gb8lQTxyJrb4QP5iZT8GDzCYYwlo,4544
|
|
14
14
|
ecodev_core/db_retrieval.py,sha256=sCP7TDGIcTOK5gT3Inga91bE4S31HbQPw4yI22WJbss,7392
|
|
15
15
|
ecodev_core/db_upsertion.py,sha256=ttngwZzJUQdr9Mc-qkDljJpru5yN3kvAzAMTW84CLHo,13136
|
|
@@ -28,7 +28,7 @@ ecodev_core/settings.py,sha256=UvaTv8S_HvfFAL-m1Rfqv_geSGcccuV3ziR1o1d5wu4,1795
|
|
|
28
28
|
ecodev_core/sqlmodel_utils.py,sha256=t57H3QPtKRy4ujic1clMK_2L4p0yjGJLZbDjHPZ8M94,453
|
|
29
29
|
ecodev_core/token_banlist.py,sha256=rKXG9QkfCpjOTr8gBgdX-KYNHAkKvQ9TRnGS99VC9Co,491
|
|
30
30
|
ecodev_core/version.py,sha256=eyIf8KkW_t-hMuYFIoy0cUlNaMewLe6i45m2HKZKh0Q,4403
|
|
31
|
-
ecodev_core-0.0.
|
|
32
|
-
ecodev_core-0.0.
|
|
33
|
-
ecodev_core-0.0.
|
|
34
|
-
ecodev_core-0.0.
|
|
31
|
+
ecodev_core-0.0.61.dist-info/LICENSE.md,sha256=8dqVJEbwXjPWjjRKjdLMym5k9Gi8hwtrHh84sti6KIs,1068
|
|
32
|
+
ecodev_core-0.0.61.dist-info/METADATA,sha256=Wj0Sw5HyCm5Z4n7anHgK9VpvQr_0Hgv6kKaDyRbuKA4,3510
|
|
33
|
+
ecodev_core-0.0.61.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
34
|
+
ecodev_core-0.0.61.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|