django-material-admin icon indicating copy to clipboard operation
django-material-admin copied to clipboard

TypeError: string indices must be integers

Open temirovazat opened this issue 2 years ago • 1 comments

Снимок экрана 2022-08-14 в 21 50 08

An error occurs when clicking on view all models in the application

Traceback (most recent call last): File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY-py3.8/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 261, in wrapper return self.admin_view(view, cacheable)(*args, **kwargs) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/utils/decorators.py", line 133, in wrapped_view response = view_func(request, *args, **kwargs) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY-py3.8/lib/python3.8/site-packages/django/views/decorators/cache.py", line 62, in wrapped_view_func response = view_func(request, *args, **kwargs) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY-py3.8/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 242, in inner return view(request, *args, **kwargs) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 569, in app_index app_list = self.get_app_list(request, app_label) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 539, in get_app_list app_list = sorted(app_dict.values(), key=lambda x: x["name"].lower()) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 539, in app_list = sorted(app_dict.values(), key=lambda x: x["name"].lower()) File "/Users/temirovazat/Library/Caches/pypoetry/virtualenvs/remotework-XPHdADY_-py3.8/lib/python3.8/site-packages/django/utils/functional.py", line 150, in wrapper return getattr(res, method_name)(*args, **kw) TypeError: string indices must be integers

temirovazat avatar Aug 14 '22 15:08 temirovazat

If your Django version is >= 4.1 then PR #173 will fix this

fasih avatar Aug 31 '22 07:08 fasih