django-structured-metaobjects 1.0.0__tar.gz
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.
- django_structured_metaobjects-1.0.0/LICENSE +21 -0
- django_structured_metaobjects-1.0.0/MANIFEST.in +6 -0
- django_structured_metaobjects-1.0.0/PKG-INFO +112 -0
- django_structured_metaobjects-1.0.0/README.md +81 -0
- django_structured_metaobjects-1.0.0/django_structured_metaobjects.egg-info/PKG-INFO +112 -0
- django_structured_metaobjects-1.0.0/django_structured_metaobjects.egg-info/SOURCES.txt +45 -0
- django_structured_metaobjects-1.0.0/django_structured_metaobjects.egg-info/dependency_links.txt +1 -0
- django_structured_metaobjects-1.0.0/django_structured_metaobjects.egg-info/requires.txt +4 -0
- django_structured_metaobjects-1.0.0/django_structured_metaobjects.egg-info/top_level.txt +2 -0
- django_structured_metaobjects-1.0.0/pyproject.toml +69 -0
- django_structured_metaobjects-1.0.0/setup.cfg +4 -0
- django_structured_metaobjects-1.0.0/setup.py +5 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/__init__.py +14 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/admin.py +20 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/apps.py +8 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/compiler.py +161 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/forms.py +36 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/migrations/0001_initial.py +73 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/migrations/__init__.py +0 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/models.py +103 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/schema_builder.py +166 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/serializers.py +37 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/static/structured_metaobjects/admin/meta_instance.js +23 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/urls.py +12 -0
- django_structured_metaobjects-1.0.0/structured_metaobjects/views.py +35 -0
- django_structured_metaobjects-1.0.0/tests/__init__.py +0 -0
- django_structured_metaobjects-1.0.0/tests/app/__init__.py +0 -0
- django_structured_metaobjects-1.0.0/tests/app/app/__init__.py +0 -0
- django_structured_metaobjects-1.0.0/tests/app/app/asgi.py +5 -0
- django_structured_metaobjects-1.0.0/tests/app/app/settings.py +77 -0
- django_structured_metaobjects-1.0.0/tests/app/app/urls.py +14 -0
- django_structured_metaobjects-1.0.0/tests/app/app/wsgi.py +5 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/__init__.py +0 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/admin.py +8 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/apps.py +8 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/migrations/0001_initial.py +22 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/migrations/__init__.py +0 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/models.py +12 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/serializers.py +9 -0
- django_structured_metaobjects-1.0.0/tests/app/test_module/views.py +9 -0
- django_structured_metaobjects-1.0.0/tests/test_admin.py +25 -0
- django_structured_metaobjects-1.0.0/tests/test_compiler.py +462 -0
- django_structured_metaobjects-1.0.0/tests/test_forms.py +32 -0
- django_structured_metaobjects-1.0.0/tests/test_models.py +213 -0
- django_structured_metaobjects-1.0.0/tests/test_schema_builder.py +81 -0
- django_structured_metaobjects-1.0.0/tests/test_serializers.py +79 -0
- django_structured_metaobjects-1.0.0/tests/test_views.py +120 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Gabriele Baldi 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: django-structured-metaobjects
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: User-defined typed JSON objects for Django, powered by django-structured-json-field
|
|
5
|
+
Author-email: Lotrèk <gabriele.baldi.01@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bnznamco/django-structured-metaobjects
|
|
8
|
+
Keywords: django,pydantic,django pydantic,json schema,meta models,dynamic models
|
|
9
|
+
Classifier: Environment :: Web Environment
|
|
10
|
+
Classifier: Framework :: Django
|
|
11
|
+
Classifier: Framework :: Django :: 4.2
|
|
12
|
+
Classifier: Framework :: Django :: 5.0
|
|
13
|
+
Classifier: Framework :: Django :: 5.1
|
|
14
|
+
Classifier: Framework :: Django :: 5.2
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: Django>=4.2
|
|
27
|
+
Requires-Dist: django-structured-json-field>=1.5.1
|
|
28
|
+
Requires-Dist: djangorestframework<4.0.0,>=3.14.0
|
|
29
|
+
Requires-Dist: pydantic>=2.12
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
[](https://github.com/bnznamco/django-structured-metaobjects/actions/workflows/ci.yml)
|
|
33
|
+
[](https://pypi.org/project/django-structured-metaobjects/)
|
|
34
|
+
[](https://opensource.org/licenses/MIT)
|
|
35
|
+
|
|
36
|
+
# django-structured-metaobjects
|
|
37
|
+
|
|
38
|
+
User-defined, typed JSON objects for Django — built on top of
|
|
39
|
+
[`django-structured-json-field`](https://github.com/bnznamco/django-structured-field).
|
|
40
|
+
|
|
41
|
+
Editors define **meta types** in the admin (a list of typed field
|
|
42
|
+
definitions). Each `MetaInstance` then picks one of those types and the
|
|
43
|
+
admin form / REST API automatically adapts to the schema declared by the
|
|
44
|
+
chosen type.
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
- Field kinds: primitives, `ref` (single FK), `queryset` (list of FKs),
|
|
49
|
+
`group` (nested object), `list` (repeating group), with optional
|
|
50
|
+
`translated=True` per-field.
|
|
51
|
+
- Runtime Pydantic compiler with per-MetaType caching, invalidated on save.
|
|
52
|
+
- Admin form rebuilds the `data` widget for the selected meta type.
|
|
53
|
+
- DRF `MetaTypeViewSet` / `MetaInstanceViewSet` with `schema/` action.
|
|
54
|
+
- Typed access on `instance.obj.<field>` returning the parsed Pydantic
|
|
55
|
+
model — FK / queryset fields lazily resolve to real Django objects
|
|
56
|
+
with structured-json-field's caching.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install django-structured-metaobjects
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Add to `INSTALLED_APPS`:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
INSTALLED_APPS = [
|
|
68
|
+
# ...
|
|
69
|
+
"structured",
|
|
70
|
+
"structured_metaobjects",
|
|
71
|
+
]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Wire the REST endpoints into your router:
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from rest_framework import routers
|
|
78
|
+
from structured_metaobjects.views import MetaTypeViewSet, MetaInstanceViewSet
|
|
79
|
+
|
|
80
|
+
router = routers.DefaultRouter()
|
|
81
|
+
router.register(r"meta-types", MetaTypeViewSet, "meta-types")
|
|
82
|
+
router.register(r"meta-instances", MetaInstanceViewSet, "meta-instances")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Field kinds
|
|
86
|
+
|
|
87
|
+
| kind | Python type built by the compiler | Notes |
|
|
88
|
+
|------------|--------------------------------------------|----------------------------------------|
|
|
89
|
+
| `string` | `str` | |
|
|
90
|
+
| `text` | `str` | Multi-line. |
|
|
91
|
+
| `integer` | `int` | |
|
|
92
|
+
| `number` | `float` | |
|
|
93
|
+
| `boolean` | `bool` | |
|
|
94
|
+
| `date` | `datetime.date` | |
|
|
95
|
+
| `datetime` | `datetime.datetime` | |
|
|
96
|
+
| `ref` | `<TargetModel>` | Requires `target_model="app.Model"`. |
|
|
97
|
+
| `queryset` | `List[<TargetModel>]` | Requires `target_model="app.Model"`. |
|
|
98
|
+
| `group` | nested Pydantic model from `children` | |
|
|
99
|
+
| `list` | `List[<group model>]` from `children` | |
|
|
100
|
+
|
|
101
|
+
Setting `translated=True` wraps the field in `Dict[str, T]` so the value
|
|
102
|
+
is a per-language map.
|
|
103
|
+
|
|
104
|
+
## Typed access
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
instance = MetaInstance.objects.get(pk=1)
|
|
108
|
+
obj = instance.obj # cached Pydantic instance
|
|
109
|
+
obj.title # typed string
|
|
110
|
+
obj.related_page # real Django model instance (lazy/cached)
|
|
111
|
+
obj.gallery # list of real Django model instances
|
|
112
|
+
```
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
[](https://github.com/bnznamco/django-structured-metaobjects/actions/workflows/ci.yml)
|
|
2
|
+
[](https://pypi.org/project/django-structured-metaobjects/)
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
# django-structured-metaobjects
|
|
6
|
+
|
|
7
|
+
User-defined, typed JSON objects for Django — built on top of
|
|
8
|
+
[`django-structured-json-field`](https://github.com/bnznamco/django-structured-field).
|
|
9
|
+
|
|
10
|
+
Editors define **meta types** in the admin (a list of typed field
|
|
11
|
+
definitions). Each `MetaInstance` then picks one of those types and the
|
|
12
|
+
admin form / REST API automatically adapts to the schema declared by the
|
|
13
|
+
chosen type.
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Field kinds: primitives, `ref` (single FK), `queryset` (list of FKs),
|
|
18
|
+
`group` (nested object), `list` (repeating group), with optional
|
|
19
|
+
`translated=True` per-field.
|
|
20
|
+
- Runtime Pydantic compiler with per-MetaType caching, invalidated on save.
|
|
21
|
+
- Admin form rebuilds the `data` widget for the selected meta type.
|
|
22
|
+
- DRF `MetaTypeViewSet` / `MetaInstanceViewSet` with `schema/` action.
|
|
23
|
+
- Typed access on `instance.obj.<field>` returning the parsed Pydantic
|
|
24
|
+
model — FK / queryset fields lazily resolve to real Django objects
|
|
25
|
+
with structured-json-field's caching.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install django-structured-metaobjects
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Add to `INSTALLED_APPS`:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
INSTALLED_APPS = [
|
|
37
|
+
# ...
|
|
38
|
+
"structured",
|
|
39
|
+
"structured_metaobjects",
|
|
40
|
+
]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Wire the REST endpoints into your router:
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from rest_framework import routers
|
|
47
|
+
from structured_metaobjects.views import MetaTypeViewSet, MetaInstanceViewSet
|
|
48
|
+
|
|
49
|
+
router = routers.DefaultRouter()
|
|
50
|
+
router.register(r"meta-types", MetaTypeViewSet, "meta-types")
|
|
51
|
+
router.register(r"meta-instances", MetaInstanceViewSet, "meta-instances")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Field kinds
|
|
55
|
+
|
|
56
|
+
| kind | Python type built by the compiler | Notes |
|
|
57
|
+
|------------|--------------------------------------------|----------------------------------------|
|
|
58
|
+
| `string` | `str` | |
|
|
59
|
+
| `text` | `str` | Multi-line. |
|
|
60
|
+
| `integer` | `int` | |
|
|
61
|
+
| `number` | `float` | |
|
|
62
|
+
| `boolean` | `bool` | |
|
|
63
|
+
| `date` | `datetime.date` | |
|
|
64
|
+
| `datetime` | `datetime.datetime` | |
|
|
65
|
+
| `ref` | `<TargetModel>` | Requires `target_model="app.Model"`. |
|
|
66
|
+
| `queryset` | `List[<TargetModel>]` | Requires `target_model="app.Model"`. |
|
|
67
|
+
| `group` | nested Pydantic model from `children` | |
|
|
68
|
+
| `list` | `List[<group model>]` from `children` | |
|
|
69
|
+
|
|
70
|
+
Setting `translated=True` wraps the field in `Dict[str, T]` so the value
|
|
71
|
+
is a per-language map.
|
|
72
|
+
|
|
73
|
+
## Typed access
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
instance = MetaInstance.objects.get(pk=1)
|
|
77
|
+
obj = instance.obj # cached Pydantic instance
|
|
78
|
+
obj.title # typed string
|
|
79
|
+
obj.related_page # real Django model instance (lazy/cached)
|
|
80
|
+
obj.gallery # list of real Django model instances
|
|
81
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: django-structured-metaobjects
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: User-defined typed JSON objects for Django, powered by django-structured-json-field
|
|
5
|
+
Author-email: Lotrèk <gabriele.baldi.01@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bnznamco/django-structured-metaobjects
|
|
8
|
+
Keywords: django,pydantic,django pydantic,json schema,meta models,dynamic models
|
|
9
|
+
Classifier: Environment :: Web Environment
|
|
10
|
+
Classifier: Framework :: Django
|
|
11
|
+
Classifier: Framework :: Django :: 4.2
|
|
12
|
+
Classifier: Framework :: Django :: 5.0
|
|
13
|
+
Classifier: Framework :: Django :: 5.1
|
|
14
|
+
Classifier: Framework :: Django :: 5.2
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: Django>=4.2
|
|
27
|
+
Requires-Dist: django-structured-json-field>=1.5.1
|
|
28
|
+
Requires-Dist: djangorestframework<4.0.0,>=3.14.0
|
|
29
|
+
Requires-Dist: pydantic>=2.12
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
[](https://github.com/bnznamco/django-structured-metaobjects/actions/workflows/ci.yml)
|
|
33
|
+
[](https://pypi.org/project/django-structured-metaobjects/)
|
|
34
|
+
[](https://opensource.org/licenses/MIT)
|
|
35
|
+
|
|
36
|
+
# django-structured-metaobjects
|
|
37
|
+
|
|
38
|
+
User-defined, typed JSON objects for Django — built on top of
|
|
39
|
+
[`django-structured-json-field`](https://github.com/bnznamco/django-structured-field).
|
|
40
|
+
|
|
41
|
+
Editors define **meta types** in the admin (a list of typed field
|
|
42
|
+
definitions). Each `MetaInstance` then picks one of those types and the
|
|
43
|
+
admin form / REST API automatically adapts to the schema declared by the
|
|
44
|
+
chosen type.
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
- Field kinds: primitives, `ref` (single FK), `queryset` (list of FKs),
|
|
49
|
+
`group` (nested object), `list` (repeating group), with optional
|
|
50
|
+
`translated=True` per-field.
|
|
51
|
+
- Runtime Pydantic compiler with per-MetaType caching, invalidated on save.
|
|
52
|
+
- Admin form rebuilds the `data` widget for the selected meta type.
|
|
53
|
+
- DRF `MetaTypeViewSet` / `MetaInstanceViewSet` with `schema/` action.
|
|
54
|
+
- Typed access on `instance.obj.<field>` returning the parsed Pydantic
|
|
55
|
+
model — FK / queryset fields lazily resolve to real Django objects
|
|
56
|
+
with structured-json-field's caching.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install django-structured-metaobjects
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Add to `INSTALLED_APPS`:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
INSTALLED_APPS = [
|
|
68
|
+
# ...
|
|
69
|
+
"structured",
|
|
70
|
+
"structured_metaobjects",
|
|
71
|
+
]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Wire the REST endpoints into your router:
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from rest_framework import routers
|
|
78
|
+
from structured_metaobjects.views import MetaTypeViewSet, MetaInstanceViewSet
|
|
79
|
+
|
|
80
|
+
router = routers.DefaultRouter()
|
|
81
|
+
router.register(r"meta-types", MetaTypeViewSet, "meta-types")
|
|
82
|
+
router.register(r"meta-instances", MetaInstanceViewSet, "meta-instances")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Field kinds
|
|
86
|
+
|
|
87
|
+
| kind | Python type built by the compiler | Notes |
|
|
88
|
+
|------------|--------------------------------------------|----------------------------------------|
|
|
89
|
+
| `string` | `str` | |
|
|
90
|
+
| `text` | `str` | Multi-line. |
|
|
91
|
+
| `integer` | `int` | |
|
|
92
|
+
| `number` | `float` | |
|
|
93
|
+
| `boolean` | `bool` | |
|
|
94
|
+
| `date` | `datetime.date` | |
|
|
95
|
+
| `datetime` | `datetime.datetime` | |
|
|
96
|
+
| `ref` | `<TargetModel>` | Requires `target_model="app.Model"`. |
|
|
97
|
+
| `queryset` | `List[<TargetModel>]` | Requires `target_model="app.Model"`. |
|
|
98
|
+
| `group` | nested Pydantic model from `children` | |
|
|
99
|
+
| `list` | `List[<group model>]` from `children` | |
|
|
100
|
+
|
|
101
|
+
Setting `translated=True` wraps the field in `Dict[str, T]` so the value
|
|
102
|
+
is a per-language map.
|
|
103
|
+
|
|
104
|
+
## Typed access
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
instance = MetaInstance.objects.get(pk=1)
|
|
108
|
+
obj = instance.obj # cached Pydantic instance
|
|
109
|
+
obj.title # typed string
|
|
110
|
+
obj.related_page # real Django model instance (lazy/cached)
|
|
111
|
+
obj.gallery # list of real Django model instances
|
|
112
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.py
|
|
6
|
+
django_structured_metaobjects.egg-info/PKG-INFO
|
|
7
|
+
django_structured_metaobjects.egg-info/SOURCES.txt
|
|
8
|
+
django_structured_metaobjects.egg-info/dependency_links.txt
|
|
9
|
+
django_structured_metaobjects.egg-info/requires.txt
|
|
10
|
+
django_structured_metaobjects.egg-info/top_level.txt
|
|
11
|
+
structured_metaobjects/__init__.py
|
|
12
|
+
structured_metaobjects/admin.py
|
|
13
|
+
structured_metaobjects/apps.py
|
|
14
|
+
structured_metaobjects/compiler.py
|
|
15
|
+
structured_metaobjects/forms.py
|
|
16
|
+
structured_metaobjects/models.py
|
|
17
|
+
structured_metaobjects/schema_builder.py
|
|
18
|
+
structured_metaobjects/serializers.py
|
|
19
|
+
structured_metaobjects/urls.py
|
|
20
|
+
structured_metaobjects/views.py
|
|
21
|
+
structured_metaobjects/migrations/0001_initial.py
|
|
22
|
+
structured_metaobjects/migrations/__init__.py
|
|
23
|
+
structured_metaobjects/static/structured_metaobjects/admin/meta_instance.js
|
|
24
|
+
tests/__init__.py
|
|
25
|
+
tests/test_admin.py
|
|
26
|
+
tests/test_compiler.py
|
|
27
|
+
tests/test_forms.py
|
|
28
|
+
tests/test_models.py
|
|
29
|
+
tests/test_schema_builder.py
|
|
30
|
+
tests/test_serializers.py
|
|
31
|
+
tests/test_views.py
|
|
32
|
+
tests/app/__init__.py
|
|
33
|
+
tests/app/app/__init__.py
|
|
34
|
+
tests/app/app/asgi.py
|
|
35
|
+
tests/app/app/settings.py
|
|
36
|
+
tests/app/app/urls.py
|
|
37
|
+
tests/app/app/wsgi.py
|
|
38
|
+
tests/app/test_module/__init__.py
|
|
39
|
+
tests/app/test_module/admin.py
|
|
40
|
+
tests/app/test_module/apps.py
|
|
41
|
+
tests/app/test_module/models.py
|
|
42
|
+
tests/app/test_module/serializers.py
|
|
43
|
+
tests/app/test_module/views.py
|
|
44
|
+
tests/app/test_module/migrations/0001_initial.py
|
|
45
|
+
tests/app/test_module/migrations/__init__.py
|
django_structured_metaobjects-1.0.0/django_structured_metaobjects.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "setuptools.build_meta"
|
|
3
|
+
requires = ["setuptools>=61.2"]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
authors = [{name = "Lotrèk", email = "gabriele.baldi.01@gmail.com"}]
|
|
7
|
+
classifiers = [
|
|
8
|
+
"Environment :: Web Environment",
|
|
9
|
+
"Framework :: Django",
|
|
10
|
+
"Framework :: Django :: 4.2",
|
|
11
|
+
"Framework :: Django :: 5.0",
|
|
12
|
+
"Framework :: Django :: 5.1",
|
|
13
|
+
"Framework :: Django :: 5.2",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Programming Language :: Python",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.10",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Programming Language :: Python :: 3.14",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"Django>=4.2",
|
|
25
|
+
"django-structured-json-field>=1.5.1",
|
|
26
|
+
"djangorestframework>=3.14.0,<4.0.0",
|
|
27
|
+
"pydantic>=2.12",
|
|
28
|
+
]
|
|
29
|
+
description = "User-defined typed JSON objects for Django, powered by django-structured-json-field"
|
|
30
|
+
dynamic = ["version"]
|
|
31
|
+
keywords = ["django", "pydantic", "django pydantic", "json schema", "meta models", "dynamic models"]
|
|
32
|
+
license = {text = "MIT"}
|
|
33
|
+
name = "django-structured-metaobjects"
|
|
34
|
+
requires-python = ">= 3.10"
|
|
35
|
+
|
|
36
|
+
[project.readme]
|
|
37
|
+
content-type = "text/markdown"
|
|
38
|
+
file = "README.md"
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
Homepage = "https://github.com/bnznamco/django-structured-metaobjects"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
include-package-data = true
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.packages]
|
|
47
|
+
find = {namespaces = false}
|
|
48
|
+
|
|
49
|
+
[tool.distutils.bdist_wheel]
|
|
50
|
+
universal = true
|
|
51
|
+
|
|
52
|
+
[tool.semantic_release]
|
|
53
|
+
version_variables = ["setup.py:__version__", "structured_metaobjects/__init__.py:__version__"]
|
|
54
|
+
|
|
55
|
+
[tool.semantic_release.branches.master]
|
|
56
|
+
match = "master"
|
|
57
|
+
prerelease = false
|
|
58
|
+
|
|
59
|
+
[tool.semantic_release.branches."next"]
|
|
60
|
+
match = "next"
|
|
61
|
+
prerelease = true
|
|
62
|
+
prerelease_token = "beta"
|
|
63
|
+
|
|
64
|
+
[tool.semantic_release.changelog]
|
|
65
|
+
mode = "update"
|
|
66
|
+
|
|
67
|
+
[tool.semantic_release.changelog.default_templates]
|
|
68
|
+
changelog_file = "CHANGELOG.md"
|
|
69
|
+
output_format = "md"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from .schema_builder import MetaFieldKind, MetaTypeFieldDef
|
|
2
|
+
from .compiler import build_pydantic_model, clear_cache, get_json_schema
|
|
3
|
+
|
|
4
|
+
__version__ = "1.0.0"
|
|
5
|
+
|
|
6
|
+
default_app_config = "structured_metaobjects.apps.StructuredMetaobjectsConfig"
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"MetaFieldKind",
|
|
10
|
+
"MetaTypeFieldDef",
|
|
11
|
+
"build_pydantic_model",
|
|
12
|
+
"clear_cache",
|
|
13
|
+
"get_json_schema",
|
|
14
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from django.contrib import admin
|
|
2
|
+
|
|
3
|
+
from .forms import MetaInstanceForm
|
|
4
|
+
from .models import MetaInstance, MetaType
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@admin.register(MetaType)
|
|
8
|
+
class MetaTypeAdmin(admin.ModelAdmin):
|
|
9
|
+
list_display = ("name",)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@admin.register(MetaInstance)
|
|
13
|
+
class MetaInstanceAdmin(admin.ModelAdmin):
|
|
14
|
+
form = MetaInstanceForm
|
|
15
|
+
list_display = ("__str__", "meta_type", "updated_at")
|
|
16
|
+
list_filter = ("meta_type",)
|
|
17
|
+
search_fields = ()
|
|
18
|
+
|
|
19
|
+
class Media:
|
|
20
|
+
js = ("structured_metaobjects/admin/meta_instance.js",)
|