django自带的admin错误怎么处理啊?见内容

[DEBUG] 2019-03-29 10:52:38,505 [uWSGIWorker3Core0:139813926107264] [django.template:872] [base:_resolve_lookup]- Exception while resolving variable 'is_popup' in template 'admin/index.html'.

Traceback (most recent call last): File "/usr/local/python3/lib/python3.6/site-packages/django/template/base.py", line 829, in _resolve_lookup current = current[bit]

File "/usr/local/python3/lib/python3.6/site-packages/django/template/context.py", line 83, in getitem raise KeyError(key) KeyError: 'is_popup'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/python3/lib/python3.6/site-packages/django/template/base.py", line 835, in _resolve_lookup if isinstance(current, BaseContext) and getattr(type(current), bit): AttributeError: type object 'RequestContext' has no attribute 'is_popup'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/python3/lib/python3.6/site-packages/django/template/base.py", line 843, in _resolve_lookup current = current[int(bit)] ValueError: invalid literal for int() with base 10: 'is_popup'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/python3/lib/python3.6/site-packages/django/template/base.py", line 850, in _resolve_lookup (bit, current)) # missing attribute django.template.base.VariableDoesNotExist: Failed lookup for key [is_popup] in [{'True': True, 'False': False, 'None': None}, {'csrf_token': ._get_val at 0x7f28e7c5dae8>>, 'request': , 'user': >, 'perms': , 'messages': , 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'SUCCESS': 25, 'WARNING': 30, 'ERROR': 40}}, {}, {'site_title': 'Django 站点管理员', 'site_header': 'Django 管理', 'site_url': '/', 'has_permission': True, 'available_apps': [{'name': 'Celery Results', 'app_label': 'django_celery_results', 'app_url': '/admin/django_celery_results/', 'has_module_perms': True, 'models': [{'name': 'Task results', 'object_name': 'TaskResult', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/django_celery_results/taskresult/', 'add_url': '/admin/django_celery_results/taskresult/add/'}]}, {'name': 'Myapp', 'app_label': 'myApp', 'app_url': '/admin/myApp/', 'has_module_perms': True, 'models': [{'name': 'Merchant_informations', 'object_name': 'Merchant_information', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/myApp/merchant_information/', 'add_url': '/admin/myApp/merchant_information/add/'}]}, {'name': '认证和授权', 'app_label': 'auth', 'app_url': '/admin/auth/', 'has_module_perms': True, 'models': [{'name': '用户', 'object_name': 'User', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/auth/user/', 'add_url': '/admin/auth/user/add/'}, {'name': '组', 'object_name': 'Group', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/auth/group/', 'add_url': '/admin/auth/group/add/'}]}], 'title': '站点管理', 'app_list': [{'name': 'Celery Results', 'app_label': 'django_celery_results', 'app_url': '/admin/django_celery_results/', 'has_module_perms': True, 'models': [{'name': 'Task results', 'object_name': 'TaskResult', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/django_celery_results/taskresult/', 'add_url': '/admin/django_celery_results/taskresult/add/'}]}, {'name': 'Myapp', 'app_label': 'myApp', 'app_url': '/admin/myApp/', 'has_module_perms': True, 'models': [{'name': 'Merchant_informations', 'object_name': 'Merchant_information', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/myApp/merchant_information/', 'add_url': '/admin/myApp/merchant_information/add/'}]}, {'name': '认证和授权', 'app_label': 'auth', 'app_url': '/admin/auth/', 'has_module_perms': True, 'models': [{'name': '用户', 'object_name': 'User', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/auth/user/', 'add_url': '/admin/auth/user/add/'}, {'name': '组', 'object_name': 'Group', 'perms': {'add': True, 'change': True, 'delete': True, 'view': True}, 'view_only': False, 'admin_url': '/admin/auth/group/', 'add_url': '/admin/auth/group/add/'}]}], 'LANGUAGE_CODE': 'zh-hans', 'LANGUAGE_BIDI': False}]

评论 0