Django调试工具栏-Java错误找不到djdt

时间:2018-12-07 17:05:26

标签: django django-debug-toolbar

在控制台中,我看到以下调试工具栏错误:

source/app.d(7,9): Error: function core.stdc.signal.signal(int sig, extern (C) void function(int) nothrow @nogc @system func) is not callable using argument types (int, void function(int value))
source/app.d(7,9):        cannot pass argument & stopapp of type void function(int value) to parameter extern (C) void function(int) nothrow @nogc @system func
dmd failed with exit code 1.

我已按照https://django-debug-toolbar.readthedocs.io/en/latest/installation.html

进行了所有设置

它确实起作用了,但是突然之间不再起作用了,我很确定我没有做任何事情将其关闭。

有人碰到这个吗?

谢谢

settings.py

ReferenceError: Can't find variable: djdt
Global Code — toolbar.js:306

urls.py

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'api.apps.ApiConfig',
    ... 
    'storages',
    'imagekit',
    'django_celery_results',
    'debug_toolbar',
    'simple_history',
    'crispy_forms',
    'rest_framework',
)

MIDDLEWARE = [
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',  
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    'simple_history.middleware.HistoryRequestMiddleware',
]
INTERNAL_IPS = ('127.0.0.1')

def show_toolbar(request):
    return True

DEBUG_TOOLBAR_CONFIG = {
    'JQUERY_URL':'',
    "SHOW_TOOLBAR_CALLBACK" : show_toolbar,
}

0 个答案:

没有答案