一、File "D:\kbengine-2.5.8\kbe\tools\server\webconsole\WebConsole\urls.py", line 16, in <module>
from . import views, auth, views_console, views_profile, views_log, views_watcher, views_status, views_spaceviewer
File "D:\kbengine-2.5.8\kbe\tools\server\webconsole\WebConsole\views_console.py", line 66, in <module>
@accept_websocket
File "D:\kbengine-2.5.8\kbe\tools\server\webconsole\dwebsocket\decorators.py", line 31, in accept_websocket
func = _setup_websocket(func)
File "D:\kbengine-2.5.8\kbe\tools\server\webconsole\dwebsocket\decorators.py", line 24, in _setup_websocket
new_func = decorator(new_func)
File "C:\Python\lib\site-packages\django\utils\decorators.py", line 117, in _decorator
middleware = middleware_class(view_func, *m_args, **m_kwargs)
TypeError: object() takes no parameters
decorator_from_middleware方法是无参调用,
def decorator_from_middleware(middleware_class):
"""
Given a middleware class (not an instance), return a view decorator. This
lets you use middleware functionality on a per-view basis. The middleware
is created with no params passed.
"""
return make_middleware_decorator(middleware_class)()
修改:将dwebsocket\decorators.py中的decorator_from_middleware改为decorator_from_middleware_with_args
from django.utils.decorators import decorator_from_middleware_with_args
decorator = decorator_from_middleware_with_args(WebSocketMiddleware)
二、ERRORS:
?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.
?: (admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEWARE in order to use the admin application.
?: (admin.E410) 'django.contrib.sessions.middleware.SessionMiddleware' must be in MIDDLEWARE in order to use the admin application.
1.将 MIDDLEWARE_CLASSES 改为 MIDDLEWARE
2.将 'django,contrib.auth.middleware.SessionAuthenticationMiddleware', 删除
三、is not a registered tag library. Must be one of
admin_list
admin_modify
admin_static
admin_urls
cache
i18n
l10n
log
static
staticfiles
tz
修正
{% load staticfiles %}
改成
{% load static %}