Opened 6 years ago

Closed 6 years ago

#11451 closed (invalid)

Retrieving forms fields that are specific to a certian base class

Reported by: gruszczy Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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.

Change History (1)

comment:1 Changed 6 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top