我得到“Uncaught TypeError:$(...)。draggable不是函数”

时间:2016-09-21 23:12:01

标签: javascript jquery

我是Javascript / UI新手....我一直得到Uncaught TypeError

import os
import mongoengine
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


DEBUG = True

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

MIDDLEWARE = [
    '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',
]

ROOT_URLCONF = 'fvp_amu.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'fvp_amu.wsgi.application'


# Database

DATABASES = {
    'default' : {
        'ENGINE' : '',
        'NAME' : 'fvp_amu'
        }
    }

# Password validation

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

STATIC_URL = '/static/'

任何人都可以建议,我试着谷歌......我看到有人建议检查你是否已经安装

i.)Uncaught  TypeError: $(...).draggable is not a function

ii.)Uncaught TypeError: $(...).datepicker is not a function

下面是两个错误: -

i.)jquery.tool.min.js with core files(which i am assuming is a jquery.min.js) and

   ii.)jquery.min.js

1 个答案:

答案 0 :(得分:0)

您需要下载并添加jquery UI,这里有最新版本的链接: http://jqueryui.com/resources/download/jquery-ui-1.12.1.zip