问题叙述
之前使用的是2.3.4版本,是可以正常使用import-export插件的。升级到3.0.1之后,页面报错无法使用了。
目前使用版本
python: 3.6.8
django: 3.1.11
simpleui: 4.0.2
django-simpleui: 2021.6.1
simplepro: 3.0.1
报错截图如下:
代码:
后台报错:
Internal Server Error: /ucap/cmdb/service/
Traceback (most recent call last):
File "/data/ENV/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/data/ENV/lib/python3.6/site-packages/django/core/handlers/base.py", line 171, in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
File "<string>", line 29, in process_view
File "<string>", line 38, in process_view
File "<string>", line 144, in pre_process
File "<string>", line 336, in process_list
File "/data/ENV/lib/python3.6/site-packages/django/shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/data/ENV/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 170, in render
return self._render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/data/ENV/lib/python3.6/site-packages/django/contrib/admin/templatetags/base.py", line 33, in render
return super().render(context)
File "/data/ENV/lib/python3.6/site-packages/django/template/library.py", line 214, in render
_dict = self.func(*resolved_args, **resolved_kwargs)
File "/data/ENV/lib/python3.6/site-packages/django/contrib/admin/templatetags/admin_list.py", line 458, in search_form
'show_result_count': cl.result_count != cl.full_result_count,
AttributeError: 'ServiceAdmin' object has no attribute 'result_count'