def _iter_editfields(restfulcls): fieldnames = restfulcls.EditForm.Meta.fields for fieldname in fieldnames: foreignkey_restfulcls = restfulcls._meta.get_foreignkey_fieldcls(fieldname) extfield = djangofield_to_extjsformfield(restfulcls._meta.simplified._meta.model, fieldname, foreignkey_restfulcls) yield extfield
def _iter_editfields(restfulcls): fieldnames = restfulcls.EditForm.Meta.fields for fieldname in fieldnames: foreignkey_restfulcls = restfulcls._meta.get_foreignkey_fieldcls( fieldname) extfield = djangofield_to_extjsformfield( restfulcls._meta.simplified._meta.model, fieldname, foreignkey_restfulcls) yield extfield
def test_djangofield_to_extjs_xtype(self): extfield = djangofield_to_extjsformfield(Period, 'parentnode', RestfulSimplifiedPeriod)