根据flask appbuilder的文档,模型详细视图的显示顺序可以定义如下:
class DeviceView(ModelView):
datamodel = SQLAInterface(Device)
related_views = [ApplicationView, EventView]
label_columns = {'snr':'SNR', 'api_dev_id':'Device ID', 'api_dev_key':'Device Key','owner_id':'Owner'}
list_columns = ['name','snr','addr','owner']
show_fieldsets = [
('Summary',
{'fields':['name','snr','owner']}
),
('Device Info',
{'fields': ['addr','latitude','longitude','status','api_id','api_key','api_dev_id','api_dev_key'],'expanded':True}
),
]
它适用于详细视图。但我找不到编辑视图的定义。这是我的设备编辑页面快照。顺序似乎是随机的。
我错过了文档中的任何部分吗?