用Django做的网站,别的页面都能用,但是http://127.0.0.1:8000/xadmin/ 登不上去,一直显示:TemplateDoesNotExist at /xadmin/。
调试器报错为:django.template.exceptions.TemplateDoesNotExist: xadmin/views/register.html APP注册和路径设置应该都没问题 - INSTALLED_APPS = [
- ...,
- 'xadmin',
- 'crispy_forms',
- ]
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(BASE_DIR, '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',
- ],
- },
- },
- ]
- urlpatterns = [
- url(r'^xadmin/', xadmin.site.urls),
- ...
- ]
复制代码请问是哪里有问题?该如何解决?
|