@property
def data_columns_spec(self):
spec = []
+
for field_name in self.data_columns:
column = {
'dataIndex': field_name,
column['sortable'] = True
if field_name in self.data_editable_columns:
column['editable'] = True
+ if field_name in [field.name for field in self.model_meta.fields if isinstance(field.rel, ManyToOneRel)]:
+ column['xtype'] = 'foreignkeycolumn'
spec.append(column)
return spec