You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DJ07] Do not set fields to '__all__' on ModelForm, use fields instead
Rocio Aramberri edited this page Jun 13, 2021
·
4 revisions
When using a ModelForm it is possible to set the field's value to the special value '__all__' to indicate that all the Model fields should be included on the form.
Even though it is practical, it is not recommended due to security concerns. Any new field that is added to the model will be automatically exposed for modification.
Instead, you should explicitly specify each of the fields that you want to be included on the ModelForm.