0
是否可以在django Admin中將表單添加到fieldset視圖中?Django - 將表單添加到django admin中的字段集?
admin.py
class ConfigTemplateAdmin(admin.ModelAdmin):
form = VariableForm
list_display = ('device_name', 'date_modified')
fieldsets = (
('Switch Details',{
'fields' : (
('device_name',),
('config','remote_config'),
(form)
)
}),
)
上面給我的錯誤:
sequence item 0: expected string or Unicode, ModelFormMetaclass found