I am getting several TemplateDoesNotExist .like below .
======================================================================
ERROR: test_pickling
(template_tests.test_response.SimpleTemplateResponseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Users\IBM_ADMIN\PythonWorkspace\DJangoTestCases\src\DJangoTestCases\tests\template_tests\test_response.py",
line 178, in test_pickling
response.render()
File "C:\Python27\lib\site-packages\django\template\response.py", line
158, in render
self.content = self.rendered_content
File "C:\Python27\lib\site-packages\django\template\response.py", line
133, in rendered_content
template = self._resolve_template(self.template_name)
File "C:\Python27\lib\site-packages\django\template\response.py", line
88, in _resolve_template
new_template = self.resolve_template(template)
File "C:\Python27\lib\site-packages\django\template\response.py", line
80, in resolve_template
return loader.get_template(template, using=self.using)
File "C:\Python27\lib\site-packages\django\template\loader.py", line 46,
in get_template
raise TemplateDoesNotExist(template_name)
TemplateDoesNotExist: first/test.html
Here is my setting.py ,seems I am missing something here .
BASE_TEST_DIR = os.path.join(BASE_DIR,'tests')
TEMPATE_TESTS = os.path.join(BASE_TEST_DIR,'template_tests')
TEMPATE_LODER=os.path.join(BASE_TEST_DIR,'template_loader')
TEMPATE_BACKENDS=os.path.join(BASE_TEST_DIR,'template_backends')
TEST_UTILS=os.path.join(BASE_TEST_DIR,'test_utils')
TEST_CLIENT_REGRESS=os.path.join(BASE_TEST_DIR,'test_client_regress')
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [ os.path.join(BASE_TEST_DIR, 'templates'),
os.path.join(TEMPATE_BACKENDS, 'templates'),
os.path.join(TEMPATE_TESTS, 'templates'),
os.path.join(TEST_UTILS, 'templates'),
os.path.join(TEST_CLIENT_REGRESS, 'templates'),
os.path.join(TEMPATE_LODER, 'templates'),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
},
},
]
I can see the " templates" folder in following path .Following variables
are initialized correctly .
All these folders have " templates" folder .
TEMPATE_TESTS = os.path.join(BASE_TEST_DIR,'template_tests')
TEMPATE_LODER=os.path.join(BASE_TEST_DIR,'template_loader')
TEMPATE_BACKENDS=os.path.join(BASE_TEST_DIR,'template_backends')
TEST_UTILS=os.path.join(BASE_TEST_DIR,'test_utils')
TEST_CLIENT_REGRESS=os.path.join(BASE_TEST_DIR,'test_client_regress')
Please help
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/08d6c2fe-c8be-465c-9fba-e93b105d1ef7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.