DJANGO : Inlineformset specifying fields / exclude
can i simply do this by
BusinessFormSet = inlineformset_factory(Address, Person, exclude = 'middlen')
what if not, please let me know how i should go about specifying which fields i want to 开发者_JAVA技巧render?
Yes, you can:
https://docs.djangoproject.com/en/1.3/topics/forms/modelforms/#controlling-which-fields-are-used-with-fields-and-exclude
But:
BusinessFormSet = inlineformset_factory(Address, Person, exclude = ['middlen'])
exclude must be a iterable object like a list
精彩评论