Answer the question
In order to leave comments, you need to log in
Django. How to work with fields (and groups of fields) stored in JSONField()?
Greetings!
Question on Django 1.11 in conjunction with PostgreSQL 9.6: how to work with JSONField type fields ? Let me explain.
data
( JSONField
).{
'field_name': 'value',
...
'group_fields_name':
{
'field_name_1': 'value',
'field_name_2': 'value',
}
// И так далее. Всего около 20 штук,
// типы полей — select, input[type=text] и input[type=number]
}
data
) as if these fields were added to the model (edit with value substitution). Add more field
of buttons that add to the DOM from 1 to infinity of fields (nothing is regulated), which at the same time should be editable in the user's personal account (after saving the form) .Here is one example: https://imgur.com/a/DtUf3 (a group of fields from the listing above group_fields_name
).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question