我在数字海洋上有2个VPS服务于应用程序,而mydomain.com在第一个工作。我需要设置一个舞台环境,并导航我得到:
TemplateDoesNotExist at /accounts/login/
accounts/login.html
且无法登录。我的项目可见:
Python Path:
['/home/django/bookmarks_tracker/bookmarks_tracker',
'/home/django/bookmarks_tracker',
...
但模板的默认文件系统加载器已损坏:
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
Using loader django.template.loaders.app_directories.Loader:
/usr/lib/python2.7/dist-packages/django/contrib/admin/templates/accounts/login.html (File does not exist)
/usr/lib/python2.7/dist-packages/django/contrib/auth/templates/accounts/login.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/bootstrapform/templates/accounts/login.html (File does not exist)
/home/django/bookmarks_tracker/helpdesk/templates/accounts/login.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/crispy_forms/templates/accounts/login.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/django_extensions/templates/accounts/login.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/mptt/templates/accounts/login.html (File does not exist)
我确实在settings.py中为它提供了默认的文件系统加载程序:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates"), os.path.join(BASE_DIR, "helpdesk/templates"),],
'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',
],
},
},
]
TEMPLATES的结构在我的工作VPS中是相同的,并且django版本也是相同的。什么可能导致这看起来内部的应用程序,但不是模板目录?谢谢