Django ищет template в не там, где надо, игнорируя settings.py
Template-loader postmortem
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.6/site-packages/django/contrib/auth/templates/index.html (File does not exist)
В setings.py прописано:
TEMPLATE_DIRS = (
'/home/mahys/s1/s1/templates',
)
в views.py:
from django.shortcuts import render_to_response
from django.template.loader import get_template
from django.template import Context, Template
from django.http import HttpResponse
from django import template
def main(request):
return render_to_response('index.html',{})
Когда кладу шаблоны в /usr/lib/python2.6/site-packages/django/contrib/auth/templates/ все работает. С чем это может быть связанно
Updated 10 July 2012, 15:28 by mahys116.