django-superform
django-superform copied to clipboard
There is no way to loop over all superform bound fields
Composite fields not listed in the form.visible_fields and hidden_fields
Django suggest the form rendering customization by looping over form.hidden_field
and form.visible_fields
in the template - https://docs.djangoproject.com/ja/1.9/topics/forms/#looping-over-hidden-and-visible-fields. But the bound composite fields is not returned.
It seems it could be fixed but overriding __iter__
method
def __iter__(self):
for name in self.fields:
yield self[name]
for name in self.composite_fields:
yield self[name]