예제 #1
0
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
예제 #2
0
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
예제 #3
0
 def test_djangofield_to_extjs_xtype(self):
     extfield = djangofield_to_extjsformfield(Period, 'parentnode', RestfulSimplifiedPeriod)