Django Crispy Forms 没有加载正确的模板包

Django Crispy Forms not loading proper templatepack

---我在Ubuntu---

我正在尝试设置 Django Crispy 表单并收到以下错误:

Exception Type: TemplateDoesNotExist
Exception Value:    
bootstrap3/layout/buttonholder.html

Settings.py 模板设置

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {...............

模板加载程序事后分析

Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/home/schachte/Documents/School/cse360/CSE_360_Project/CSE360_Project/ipcms/ipcms/templates/bootstrap3/layout/buttonholder.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/contrib/admin/templates/bootstrap3/layout/buttonholder.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/Django-1.8.4-py2.7.egg/django/contrib/auth/templates/bootstrap3/layout/buttonholder.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/crispy_forms/templates/bootstrap3/layout/buttonholder.html (File does not exist)

很明显,它试图找到的目录不在那里,但我怎样才能让脆皮表格找到正确的 bootstrap 目录?

您目前将静态内容保存在哪里。问题似乎是由于 Django 无法从 bootstrap.

中找到您的静态内容

ButtonHolder 不是 Bootstrap 模板包的一部分。据记载并非如此。

this issue for discussion

最好的办法是使用 FormActions 而不是