__init__() missing 1 required positional argument: 'sortable_by'报错解决方案

这是django-jet的bug,解决很简单

进入虚拟环境下的\Python\Python35\lib\site-packages\jet\utils.py第223行


cl = ChangeList(request, model, list_display, list_display_links, list_filter, model_admin.date_hierarchy, search_fields,list_select_related, model_admin.list_per_page, model_admin.list_max_show_all, model_admin.list_editable,model_admin)

在后面新增 , model_admin.sortable_by

cl = ChangeList(request, model, list_display, list_display_links, list_filter, model_admin.date_hierarchy,search_fields,list_select_related, model_admin.list_per_page,model_admin.list_max_show_all, model_admin.list_editable,model_admin, model_admin.sortable_by)

就OK了

参考https://github.com/geex-arts/django-jet/issues/349

你可能感兴趣的:(__init__() missing 1 required positional argument: 'sortable_by'报错解决方案)