Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-forms-as-jsonschema
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Libraries
django-forms-as-jsonschema
Merge requests
!3
Draft: Resolve "Create Model for instances of a form"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Draft: Resolve "Create Model for instances of a form"
11-create-model-for-instances-of-a-form
into
main
Overview
0
Commits
3
Pipelines
0
Changes
2
Open
Julian
requested to merge
11-create-model-for-instances-of-a-form
into
main
2 years ago
Overview
0
Commits
3
Pipelines
0
Changes
2
Expand
Closes
#11
0
0
Merge request reports
Compare
main
main (HEAD)
and
latest version
latest version
54780766
3 commits,
2 years ago
2 files
+
50
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
django_forms_as_jsonschema/forms.py
+
13
−
0
Options
@@ -20,3 +20,16 @@ class JSONSchemaFormMixin:
@@ -20,3 +20,16 @@ class JSONSchemaFormMixin:
schema
.
update_properties
(
self
.
layout
.
build_schema
(
schema
,
self
.
fields
)[
"
properties
"
])
schema
.
update_properties
(
self
.
layout
.
build_schema
(
schema
,
self
.
fields
)[
"
properties
"
])
return
schema
.
schema
return
schema
.
schema
def
jsonschema_model
(
self
:
Form
):
if
self
.
layout
is
None
:
model
=
{}
for
field
in
self
.
fields
.
keys
():
model
[
field
]
=
self
[
field
].
value
()
else
:
model
=
self
.
layout
.
build_model
(
self
)
return
model
Loading