所有表重建之后报错
来源:5-2 xadmin的安装
不 弃丶
2017-03-25
这个问题怎么解决???
集成xadmin之后把所有表删除了。然后重建出来之后进入xadmin就报错。
所有表
2回答
-
bobby
2017-03-26
你要下面具体的报错贴全, 把你的所有错误代码全部贴上 或者贴出你出错的那行代码
112017-03-27 -
不 弃丶
提问者
2017-03-27
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/xadmin/
Django Version: 1.9.8
Python Version: 2.7.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'users',
'courses',
'organization',
'operation',
'xadmin',
'crispy_forms']
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware']
Traceback:
File "/Users/jacob/.virtualenvs/mxonline/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/Users/jacob/.virtualenvs/mxonline/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/jacob/.virtualenvs/mxonline/lib/python2.7/site-packages/xadmin/sites.py" in wrapper
292. return self.admin_view(view, cacheable)(*args, **kwargs)
File "/Users/jacob/.virtualenvs/mxonline/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)
File "/Users/jacob/.virtualenvs/mxonline/lib/python2.7/site-packages/xadmin/sites.py" in inner
198. if not self.has_permission(request) and getattr(view, 'need_site_permission', True):
File "/Users/jacob/.virtualenvs/mxonline/lib/python2.7/site-packages/xadmin/sites.py" in has_permission
155. return request.user.is_active and request.user.is_staff
Exception Type: AttributeError at /xadmin/
Exception Value: 'WSGIRequest' object has no attribute 'user'
00
相似问题