---我在Ubuntu ---
我正在尝试设置Django Crispy表单并收到以下错误:
Exception Type: TemplateDoesNotExist
Exception Value:
bootstrap3/layout/buttonholder.html
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)
很明显,dir并不是它试图找到的,但我怎样才能让crispy表单找到正确的bootstrap目录?
答案 0 :(得分:3)
答案 1 :(得分:0)
您目前在哪里保存静态内容。问题似乎是由于Django无法从引导程序中找到您的静态内容。