B
B
Bjornie2017-08-17 01:09:24
Django
Bjornie, 2017-08-17 01:09:24

How to make the fieldset part required if the Boolean field was checked?

The question is about the admin. There is a common fieldset specified in the class for setting up the admin panel.
Among the model fields there is a field (BooleanField), when checked, some of the other fields must be filled in (they are not required by default and I hide them through the collapse css class).
Can you please tell me how to carry out this check and issue an appropriate error message if I submit the form for saving? Is this done via cleaned_form?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question