【发布时间】:2017-08-14 15:26:42
【问题描述】:
环境:
请求方法:GET 请求地址:http://127.0.0.1:8000/admin/
Django 版本:1.10.6 Python 版本:3.6.0 已安装的应用程序:['music.apps.MusicConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes' , 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles'] 已安装的中间件:['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware' , 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware. clickjacking.XFrameOptionsMiddleware']
追溯:
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\core\handlers\exception .py" 在内部 42. response = get_response(request)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\core\handlers\base .py" in _legacy_get_response 249. response = self._get_response(request)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\core\handlers\base .py" in _get_response 187. response = self.process_exception_by_middleware(e, request)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\core\handlers\base .py" in _get_response 185. response = Wrapped_callback(request, *callback_args, **callback_kwargs)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites .py" 在包装器 229 中。返回 self.admin_view(view, cacheable)(*args, **kwargs)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\utils\decorators.py " in _wrapped_view 149. response = view_func(request, *args, **kwargs)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\views\decorators\cache .py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites .py" 在内部 211. return view(request, *args, **kwargs)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\views\decorators\cache .py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites .py”在索引 468 中。app_list = self.get_app_list(request)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites .py" 在 get_app_list 451. app_dict = self._build_app_dict(request)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites .py" in _build_app_dict 418.model_dict['admin_url'] = reverse('admin:%s_%s_changelist' % info, current_app=self.name)
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\urls\base.py " 反向 60. app_list = resolver.app_dict[ns]
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\urls\resolvers.py " 在 app_dict 256 中。self._populate()
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\urls\resolvers.py " in _populate 209. for name in pattern.reverse_dict:
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\urls\resolvers.py " 在 reverse_dict 242 中。self._populate()
文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\urls\resolvers.py " in _populate 196. 反转模式(self.url_patterns):
异常类型:/admin/ 处的 TypeError 异常值:“set”对象不可逆
【问题讨论】: