ramifice 0.3.26__py3-none-any.whl → 0.3.28__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.
Files changed (74) hide show
  1. ramifice/__init__.py +2 -1
  2. ramifice/commons/__init__.py +1 -3
  3. ramifice/commons/general.py +1 -1
  4. ramifice/commons/indexes.py +1 -1
  5. ramifice/commons/many.py +9 -5
  6. ramifice/commons/one.py +17 -7
  7. ramifice/commons/tools.py +62 -57
  8. ramifice/commons/{units.py → unit_manager.py} +3 -3
  9. ramifice/fields/bool_field.py +2 -2
  10. ramifice/fields/choice_float_dyn_field.py +2 -2
  11. ramifice/fields/choice_float_field.py +2 -2
  12. ramifice/fields/choice_float_mult_dyn_field.py +2 -2
  13. ramifice/fields/choice_float_mult_field.py +2 -2
  14. ramifice/fields/choice_int_dyn_field.py +2 -2
  15. ramifice/fields/choice_int_field.py +2 -2
  16. ramifice/fields/choice_int_mult_dyn_field.py +2 -2
  17. ramifice/fields/choice_int_mult_field.py +2 -2
  18. ramifice/fields/choice_text_dyn_field.py +2 -2
  19. ramifice/fields/choice_text_field.py +2 -2
  20. ramifice/fields/choice_text_mult_dyn_field.py +2 -2
  21. ramifice/fields/choice_text_mult_field.py +2 -2
  22. ramifice/fields/color_field.py +2 -2
  23. ramifice/fields/date_field.py +1 -1
  24. ramifice/fields/date_time_field.py +1 -1
  25. ramifice/fields/email_field.py +2 -2
  26. ramifice/fields/file_field.py +3 -3
  27. ramifice/fields/float_field.py +2 -2
  28. ramifice/fields/id_field.py +1 -1
  29. ramifice/fields/image_field.py +3 -3
  30. ramifice/fields/integer_field.py +2 -2
  31. ramifice/fields/ip_field.py +2 -2
  32. ramifice/fields/password_field.py +1 -1
  33. ramifice/fields/phone_field.py +2 -2
  34. ramifice/fields/slug_field.py +2 -2
  35. ramifice/fields/text_field.py +2 -2
  36. ramifice/fields/url_field.py +2 -2
  37. ramifice/models/__init__.py +1 -0
  38. ramifice/{decorators.py → models/decorator.py} +11 -13
  39. ramifice/{model.py → models/model.py} +4 -4
  40. ramifice/{pseudo_model.py → models/pseudo.py} +4 -4
  41. ramifice/paladins/check.py +2 -2
  42. ramifice/paladins/delete.py +2 -2
  43. ramifice/paladins/groups/choice_group.py +1 -1
  44. ramifice/paladins/groups/date_group.py +1 -1
  45. ramifice/paladins/groups/file_group.py +2 -2
  46. ramifice/paladins/groups/id_group.py +1 -1
  47. ramifice/paladins/groups/img_group.py +2 -2
  48. ramifice/paladins/groups/num_group.py +1 -1
  49. ramifice/paladins/groups/pass_group.py +2 -2
  50. ramifice/paladins/groups/slug_group.py +1 -1
  51. ramifice/paladins/groups/text_group.py +2 -2
  52. ramifice/paladins/password.py +2 -2
  53. ramifice/paladins/refrash.py +2 -2
  54. ramifice/paladins/save.py +2 -2
  55. ramifice/paladins/tools.py +1 -1
  56. ramifice/utils/__init__.py +1 -0
  57. ramifice/{migration.py → utils/migration.py} +1 -1
  58. ramifice/utils/mixins/__init__.py +6 -0
  59. ramifice/{add_valid.py → utils/mixins/add_valid.py} +2 -2
  60. ramifice/{hooks.py → utils/mixins/hooks.py} +2 -2
  61. ramifice/utils/mixins/indexing.py +11 -0
  62. ramifice/{mixins.py → utils/mixins/json_converter.py} +2 -5
  63. ramifice/{types.py → utils/unit.py} +2 -9
  64. {ramifice-0.3.26.dist-info → ramifice-0.3.28.dist-info}/METADATA +5 -6
  65. ramifice-0.3.28.dist-info/RECORD +85 -0
  66. ramifice/indexing.py +0 -11
  67. ramifice-0.3.26.dist-info/RECORD +0 -82
  68. /ramifice/{errors.py → utils/errors.py} +0 -0
  69. /ramifice/{fixtures.py → utils/fixtures.py} +0 -0
  70. /ramifice/{store.py → utils/store.py} +0 -0
  71. /ramifice/{utilities.py → utils/tools.py} +0 -0
  72. /ramifice/{translations.py → utils/translations.py} +0 -0
  73. {ramifice-0.3.26.dist-info → ramifice-0.3.28.dist-info}/WHEEL +0 -0
  74. {ramifice-0.3.26.dist-info → ramifice-0.3.28.dist-info}/licenses/LICENSE +0 -0
ramifice/__init__.py CHANGED
@@ -14,4 +14,5 @@
14
14
 
15
15
  """ORM-like API MongoDB for Python language."""
16
16
 
17
- from .decorators import model
17
+ from .models.decorator import model
18
+ from .utils import migration, translations
@@ -4,12 +4,10 @@ from .general import GeneralMixin
4
4
  from .indexes import IndexMixin
5
5
  from .many import ManyMixin
6
6
  from .one import OneMixin
7
- from .tools import ToolMixin
8
- from .units import UnitMixin
7
+ from .unit_manager import UnitMixin
9
8
 
10
9
 
11
10
  class QCommonsMixin(
12
- ToolMixin,
13
11
  GeneralMixin,
14
12
  OneMixin,
15
13
  ManyMixin,
@@ -6,7 +6,7 @@ from pymongo.asynchronous.collection import AsyncCollection
6
6
  from pymongo.asynchronous.command_cursor import AsyncCommandCursor
7
7
  from pymongo.asynchronous.database import AsyncDatabase
8
8
 
9
- from .. import store
9
+ from ..utils import store
10
10
 
11
11
 
12
12
  class GeneralMixin:
@@ -4,7 +4,7 @@ from typing import Any
4
4
 
5
5
  from pymongo.asynchronous.collection import AsyncCollection
6
6
 
7
- from .. import store
7
+ from ..utils import store
8
8
 
9
9
 
10
10
  class IndexMixin:
ramifice/commons/many.py CHANGED
@@ -7,8 +7,9 @@ from pymongo.asynchronous.collection import AsyncCollection
7
7
  from pymongo.asynchronous.cursor import AsyncCursor, CursorType # type: ignore[attr-defined]
8
8
  from pymongo.results import DeleteResult
9
9
 
10
- from .. import store
11
- from ..errors import PanicError
10
+ from ..utils import store
11
+ from ..utils.errors import PanicError
12
+ from .tools import mongo_doc_to_raw_doc, password_to_none
12
13
 
13
14
 
14
15
  class ManyMixin:
@@ -67,8 +68,9 @@ class ManyMixin:
67
68
  session=session,
68
69
  allow_disk_use=allow_disk_use,
69
70
  )
71
+ field_name_and_type = cls.META["field_name_and_type"] # type: ignore[attr-defined]
70
72
  async for mongo_doc in cursor:
71
- doc_list.append(cls.password_to_none(mongo_doc)) # type: ignore[attr-defined]
73
+ doc_list.append(password_to_none(field_name_and_type, mongo_doc))
72
74
  return doc_list
73
75
 
74
76
  @classmethod
@@ -131,8 +133,9 @@ class ManyMixin:
131
133
  session=session,
132
134
  allow_disk_use=allow_disk_use,
133
135
  )
136
+ field_name_and_type = cls.META["field_name_and_type"] # type: ignore[attr-defined]
134
137
  async for mongo_doc in cursor:
135
- doc_list.append(cls.mongo_doc_to_raw_doc(mongo_doc)) # type: ignore[attr-defined]
138
+ doc_list.append(mongo_doc_to_raw_doc(field_name_and_type, mongo_doc))
136
139
  return doc_list
137
140
 
138
141
  @classmethod
@@ -188,8 +191,9 @@ class ManyMixin:
188
191
  session=session,
189
192
  allow_disk_use=allow_disk_use,
190
193
  )
194
+ field_name_and_type = cls.META["field_name_and_type"] # type: ignore[attr-defined]
191
195
  async for mongo_doc in cursor:
192
- doc_list.append(cls.mongo_doc_to_raw_doc(mongo_doc)) # type: ignore[attr-defined]
196
+ doc_list.append(mongo_doc_to_raw_doc(field_name_and_type, mongo_doc))
193
197
  return json.dumps(doc_list) if len(doc_list) > 0 else None
194
198
 
195
199
  @classmethod
ramifice/commons/one.py CHANGED
@@ -5,8 +5,9 @@ from typing import Any
5
5
  from pymongo.asynchronous.collection import AsyncCollection
6
6
  from pymongo.results import DeleteResult
7
7
 
8
- from .. import store
9
- from ..errors import PanicError
8
+ from ..utils import store
9
+ from ..utils.errors import PanicError
10
+ from .tools import from_mongo_doc, mongo_doc_to_raw_doc, password_to_none
10
11
 
11
12
 
12
13
  class OneMixin:
@@ -25,7 +26,10 @@ class OneMixin:
25
26
  # Get document.
26
27
  mongo_doc = await collection.find_one(filter, *args, **kwargs)
27
28
  if mongo_doc is not None:
28
- mongo_doc = cls.password_to_none(mongo_doc)
29
+ mongo_doc = password_to_none(
30
+ cls.META["field_name_and_type"],
31
+ mongo_doc,
32
+ )
29
33
  return mongo_doc
30
34
 
31
35
  @classmethod
@@ -42,7 +46,10 @@ class OneMixin:
42
46
  raw_doc = None
43
47
  mongo_doc = await collection.find_one(filter, *args, **kwargs)
44
48
  if mongo_doc is not None:
45
- raw_doc = cls.mongo_doc_to_raw_doc(mongo_doc)
49
+ raw_doc = mongo_doc_to_raw_doc(
50
+ cls.META["field_name_and_type"],
51
+ mongo_doc,
52
+ )
46
53
  return raw_doc
47
54
 
48
55
  @classmethod
@@ -60,7 +67,7 @@ class OneMixin:
60
67
  mongo_doc = await collection.find_one(filter, *args, **kwargs)
61
68
  if mongo_doc is not None:
62
69
  # Convert document to Model instance.
63
- inst_model = cls.from_mongo_doc(mongo_doc)
70
+ inst_model = from_mongo_doc(cls, mongo_doc)
64
71
  return inst_model
65
72
 
66
73
  @classmethod
@@ -78,7 +85,7 @@ class OneMixin:
78
85
  mongo_doc = await collection.find_one(filter, *args, **kwargs)
79
86
  if mongo_doc is not None:
80
87
  # Convert document to Model instance.
81
- inst_model = cls.from_mongo_doc(mongo_doc)
88
+ inst_model = from_mongo_doc(cls, mongo_doc)
82
89
  json_str = inst_model.to_json()
83
90
  return json_str
84
91
 
@@ -149,5 +156,8 @@ class OneMixin:
149
156
  **kwargs,
150
157
  )
151
158
  if mongo_doc is not None:
152
- mongo_doc = cls.password_to_none(mongo_doc)
159
+ mongo_doc = password_to_none(
160
+ cls.META["field_name_and_type"],
161
+ mongo_doc,
162
+ )
153
163
  return mongo_doc
ramifice/commons/tools.py CHANGED
@@ -4,60 +4,65 @@ from typing import Any
4
4
 
5
5
  from babel.dates import format_date, format_datetime
6
6
 
7
- from .. import translations
8
-
9
-
10
- class ToolMixin:
11
- """Tool of Commons - A set of auxiliary methods."""
12
-
13
- @classmethod
14
- def password_to_none(cls: Any, mongo_doc: dict[str, Any]) -> dict[str, Any]:
15
- """Create object instance from Mongo document."""
16
- for f_name, t_name in cls.META["field_name_and_type"].items():
17
- if "Pass" in t_name:
18
- mongo_doc[f_name] = None
19
- return mongo_doc
20
-
21
- @classmethod
22
- def from_mongo_doc(cls: Any, mongo_doc: dict[str, Any]) -> Any:
23
- """Create object instance from Mongo document."""
24
- obj = cls()
25
- for name, data in mongo_doc.items():
26
- field = obj.__dict__[name]
27
- field.value = data if field.group != "pass" else None
28
- return obj
29
-
30
- @classmethod
31
- def mongo_doc_to_raw_doc(cls: Any, mongo_doc: dict[str, Any]) -> dict[str, Any]:
32
- """Convert the Mongo document to the raw document.
33
-
34
- Special changes:
35
- _id to str
36
- password to None
37
- date to str
38
- datetime to str
39
- """
40
- doc: dict[str, Any] = {}
41
- current_locale = translations.CURRENT_LOCALE
42
- for f_name, t_name in cls.META["field_name_and_type"].items():
43
- value = mongo_doc[f_name]
44
- if value is not None:
45
- if "Date" in t_name:
46
- if "Time" in t_name:
47
- value = format_datetime(
48
- datetime=value,
49
- format="short",
50
- locale=current_locale,
51
- )
52
- else:
53
- value = format_date(
54
- date=value.date(),
55
- format="short",
56
- locale=current_locale,
57
- )
58
- elif "ID" in t_name:
59
- value = str(value)
60
- elif "Pass" in t_name:
61
- value = None
62
- doc[f_name] = value
63
- return doc
7
+ from ..utils import translations
8
+
9
+
10
+ def password_to_none(
11
+ field_name_and_type: dict[str, str],
12
+ mongo_doc: dict[str, Any],
13
+ ) -> dict[str, Any]:
14
+ """Create object instance from Mongo document."""
15
+ for f_name, t_name in field_name_and_type.items():
16
+ if "Pass" in t_name:
17
+ mongo_doc[f_name] = None
18
+ return mongo_doc
19
+
20
+
21
+ def from_mongo_doc(
22
+ cls_model: Any,
23
+ mongo_doc: dict[str, Any],
24
+ ) -> Any:
25
+ """Create object instance from Mongo document."""
26
+ obj = cls_model()
27
+ for name, data in mongo_doc.items():
28
+ field = obj.__dict__[name]
29
+ field.value = data if field.group != "pass" else None
30
+ return obj
31
+
32
+
33
+ def mongo_doc_to_raw_doc(
34
+ field_name_and_type: dict[str, str],
35
+ mongo_doc: dict[str, Any],
36
+ ) -> dict[str, Any]:
37
+ """Convert the Mongo document to the raw document.
38
+
39
+ Special changes:
40
+ _id to str
41
+ password to None
42
+ date to str
43
+ datetime to str
44
+ """
45
+ doc: dict[str, Any] = {}
46
+ current_locale = translations.CURRENT_LOCALE
47
+ for f_name, t_name in field_name_and_type.items():
48
+ value = mongo_doc[f_name]
49
+ if value is not None:
50
+ if "Date" in t_name:
51
+ if "Time" in t_name:
52
+ value = format_datetime(
53
+ datetime=value,
54
+ format="short",
55
+ locale=current_locale,
56
+ )
57
+ else:
58
+ value = format_date(
59
+ date=value.date(),
60
+ format="short",
61
+ locale=current_locale,
62
+ )
63
+ elif "ID" in t_name:
64
+ value = str(value)
65
+ elif "Pass" in t_name:
66
+ value = None
67
+ doc[f_name] = value
68
+ return doc
@@ -7,9 +7,9 @@ from typing import Any
7
7
 
8
8
  from pymongo.asynchronous.collection import AsyncCollection
9
9
 
10
- from .. import store
11
- from ..errors import PanicError
12
- from ..types import Unit
10
+ from ..utils import store
11
+ from ..utils.errors import PanicError
12
+ from ..utils.unit import Unit
13
13
 
14
14
 
15
15
  class UnitMixin:
@@ -1,7 +1,7 @@
1
1
  """Field of Model for enter boolean value."""
2
2
 
3
- from .. import store
4
- from ..mixins import JsonMixin
3
+ from ..utils import store
4
+ from ..utils.mixins.json_converter import JsonMixin
5
5
  from .general.field import Field
6
6
 
7
7
 
@@ -3,8 +3,8 @@
3
3
  Type of selective float field with dynamic addition of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective float field with static of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective float field with dynamic addition of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective float field with static of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective integer field with dynamic addition of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective integer field with static of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective integer field with dynamic addition of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective integer field with static of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective text field with dynamic addition of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective text field with static of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective text field with dynamic addition of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -3,8 +3,8 @@
3
3
  Type of selective text field with static of elements.
4
4
  """
5
5
 
6
- from .. import store
7
- from ..mixins import JsonMixin
6
+ from ..utils import store
7
+ from ..utils.mixins.json_converter import JsonMixin
8
8
  from .general.choice_group import ChoiceGroup
9
9
  from .general.field import Field
10
10
 
@@ -1,7 +1,7 @@
1
1
  """Field of Model for enter color code."""
2
2
 
3
- from .. import store
4
- from ..mixins import JsonMixin
3
+ from ..utils import store
4
+ from ..utils.mixins.json_converter import JsonMixin
5
5
  from .general.field import Field
6
6
  from .general.text_group import TextGroup
7
7
 
@@ -7,7 +7,7 @@ from typing import Any
7
7
  from babel.dates import format_date
8
8
  from dateutil.parser import parse
9
9
 
10
- from .. import store, translations
10
+ from ..utils import store, translations
11
11
  from .general.date_group import DateGroup
12
12
  from .general.field import Field
13
13
 
@@ -7,7 +7,7 @@ from typing import Any
7
7
  from babel.dates import format_datetime
8
8
  from dateutil.parser import parse
9
9
 
10
- from .. import store, translations
10
+ from ..utils import store, translations
11
11
  from .general.date_group import DateGroup
12
12
  from .general.field import Field
13
13
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  from email_validator import EmailNotValidError, validate_email
4
4
 
5
- from .. import store
6
- from ..mixins import JsonMixin
5
+ from ..utils import store
6
+ from ..utils.mixins.json_converter import JsonMixin
7
7
  from .general.field import Field
8
8
  from .general.text_group import TextGroup
9
9
 
@@ -8,9 +8,9 @@ from datetime import date
8
8
  from pathlib import Path
9
9
  from typing import Any
10
10
 
11
- from .. import store
12
- from ..errors import FileHasNoExtensionError
13
- from ..mixins import JsonMixin
11
+ from ..utils import store
12
+ from ..utils.errors import FileHasNoExtensionError
13
+ from ..utils.mixins.json_converter import JsonMixin
14
14
  from .general.field import Field
15
15
  from .general.file_group import FileGroup
16
16
 
@@ -1,7 +1,7 @@
1
1
  """Field of Model for enter (float) number."""
2
2
 
3
- from .. import store
4
- from ..mixins import JsonMixin
3
+ from ..utils import store
4
+ from ..utils.mixins.json_converter import JsonMixin
5
5
  from .general.field import Field
6
6
  from .general.number_group import NumberGroup
7
7
 
@@ -5,7 +5,7 @@ from typing import Any
5
5
 
6
6
  from bson.objectid import ObjectId
7
7
 
8
- from .. import store
8
+ from ..utils import store
9
9
  from .general.field import Field
10
10
 
11
11
 
@@ -10,9 +10,9 @@ from typing import Any
10
10
 
11
11
  from PIL import Image
12
12
 
13
- from .. import store
14
- from ..errors import FileHasNoExtensionError
15
- from ..mixins import JsonMixin
13
+ from ..utils import store
14
+ from ..utils.errors import FileHasNoExtensionError
15
+ from ..utils.mixins.json_converter import JsonMixin
16
16
  from .general.field import Field
17
17
  from .general.file_group import FileGroup
18
18
 
@@ -1,7 +1,7 @@
1
1
  """Field of Model for enter (int) number."""
2
2
 
3
- from .. import store
4
- from ..mixins import JsonMixin
3
+ from ..utils import store
4
+ from ..utils.mixins.json_converter import JsonMixin
5
5
  from .general.field import Field
6
6
  from .general.number_group import NumberGroup
7
7
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  import ipaddress
4
4
 
5
- from .. import store
6
- from ..mixins import JsonMixin
5
+ from ..utils import store
6
+ from ..utils.mixins.json_converter import JsonMixin
7
7
  from .general.field import Field
8
8
  from .general.text_group import TextGroup
9
9
 
@@ -3,7 +3,7 @@
3
3
  import json
4
4
  from typing import Any
5
5
 
6
- from .. import store
6
+ from ..utils import store
7
7
  from .general.field import Field
8
8
 
9
9
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  import phonenumbers
4
4
 
5
- from .. import store
6
- from ..mixins import JsonMixin
5
+ from ..utils import store
6
+ from ..utils.mixins.json_converter import JsonMixin
7
7
  from .general.field import Field
8
8
  from .general.text_group import TextGroup
9
9
 
@@ -1,7 +1,7 @@
1
1
  """Field of Model for automatic generation of string `slug`."""
2
2
 
3
- from .. import store
4
- from ..mixins import JsonMixin
3
+ from ..utils import store
4
+ from ..utils.mixins.json_converter import JsonMixin
5
5
  from .general.field import Field
6
6
  from .general.text_group import TextGroup
7
7
 
@@ -1,7 +1,7 @@
1
1
  """Field of Model for enter text."""
2
2
 
3
- from .. import store
4
- from ..mixins import JsonMixin
3
+ from ..utils import store
4
+ from ..utils.mixins.json_converter import JsonMixin
5
5
  from .general.field import Field
6
6
  from .general.text_group import TextGroup
7
7
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  from urllib.parse import urlparse
4
4
 
5
- from .. import store
6
- from ..mixins import JsonMixin
5
+ from ..utils import store
6
+ from ..utils.mixins.json_converter import JsonMixin
7
7
  from .general.field import Field
8
8
  from .general.text_group import TextGroup
9
9
 
@@ -0,0 +1 @@
1
+ """Models."""