Retrieving forms fields that are specific to a certian base class
|Reported by:||gruszczy||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When I create a mixin from two forms and in one of the base forms I would like to access only fields that are specific to this base class, it can't be easily done. Form class could have some class method, that would return list of fields' names, that are specific for this form.
My motivation for this is that I am using completely different model backend, that is accessed through web services. When I save an object in one of the base classes, I need to pass specifically fields accepted by the web service, but if use for name in self.field, I get all fields from all base classes. I hacked it using dir on a base class, but that's ugly and I would love to use something cleaner.