Issue
Hi Everyone
I want to know if a ModelForm is better than a Form to write a form for a normal user that has complicated form validation and more fields than a Model. Which one is more professional?
Thanks
Solution
ModelForm
s are just a matter of convenience: if your form can be easily be mapped to model, use a ModelForm. Validation is basically the same for ModelForm
s and regular Forms
, but using ModelForm
s will save you the hassle of writing the some of the validation rules by hand.
Answered By - Uku Loskit
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.