Help Exception Type: TemplateDoesNotExist at /!/course/edition/2/

33 views
Skip to first unread message

noel

unread,
Nov 24, 2010, 5:36:21 AM11/24/10
to peach³ support
Environment:

Request Method: GET
Request URL: http://localhost:8000/!/course/edition/2/
Django Version: 1.2.3
Python Version: 2.5.4
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.markup',
'south',
'django_extensions',
'pdfviewer',
'peach3',
'peach3.core',
'peach3.i18n',
'peach3.main',
'peach3.skin',
'peach3.user',
'peach3.grade',
'peach3.course',
'peach3.assignment',
'peach3.submission',
'peach3.files',
'peach3.pdf',
'peach3.wiki',
'peach3.checking',
'peach3.forum',
'peach3.news',
'peach3.utils',
'peach3.report',
'peach3.scoreboard',
'peach3.programming_language',
'peach3.stats']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'peach3.user.middleware.LocaleMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.http.ConditionalGetMiddleware')

Template Loader Error:
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.function:
Using loader django.template.loaders.app_directories.function:



Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in
get_response
100. response = callback(request,
*callback_args, **callback_kwargs)
File "C:\Documents and Settings\noel\Desktop\peach3\..\peach3\course
\views.py" in edition
45.
context_instance=RequestContext(request))
File "C:\Python25\Lib\site-packages\django\shortcuts\__init__.py" in
render_to_response
20. return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
File "C:\Python25\lib\site-packages\django\template\loader.py" in
render_to_string
181. t = get_template(template_name)
File "C:\Python25\lib\site-packages\django\template\loader.py" in
get_template
160. template = get_template_from_string(template, origin,
template_name)
File "C:\Python25\lib\site-packages\django\template\loader.py" in
get_template_from_string
168. return Template(source, origin, name)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
__init__
158. self.nodelist = compile_string(template_string, origin)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
compile_string
186. return parser.parse()
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
parse
282. compiled_result = compile_func(self, token)
File "C:\Python25\Lib\site-packages\django\template\defaulttags.py" in
do_if
829. nodelist_true = parser.parse(('else', 'endif'))
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
parse
282. compiled_result = compile_func(self, token)
File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in
do_include
215. return ConstantIncludeNode(path[1:-1])
File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in
__init__
130. t = get_template(template_path)
File "C:\Python25\lib\site-packages\django\template\loader.py" in
get_template
157. template, origin = find_template(template_name)
File "C:\Python25\lib\site-packages\django\template\loader.py" in
find_template
138. raise TemplateDoesNotExist(name)

Exception Type: TemplateDoesNotExist at /!/course/edition/2/
Exception Value: course/panel/plugin/comparison.jstpl

Erik Scheffers

unread,
Nov 24, 2010, 5:58:48 AM11/24/10
to peach³ support
Thats a big traceback without any context. At least a listing of your
settings.py would be useful. I'll try without.

The problem is that a template "course/panel/plugin/comparison.jstpl"
is being loaded, but that template does not exist. Which is correct,
as it part of a plug-in package and not part of the standard
distribution. The setting HAVE_COMPARISON enables this plug-in. It
should be set to False if you do not have this plug-in.

Maybe you set HAVE_COMPARISON to True in your settings? Or maybe you
are using the supplied development settings (in development.py)? Since
you're not developing, using the development settings would create all
sorts of problems as it imports various packages that are not part of
the distribution.

Make sure HAVE_COMPARISON is set to False in the settings and this
exception should go away.

Erik

noel

unread,
Nov 24, 2010, 7:32:49 AM11/24/10
to peach³ support
Hi Erik,

Thanks for the quick response. And yeah, sorry about that very long
error trace.

I wonder why its loading that plug in when HAVE_COMPARISON is False,
and development.py is not in use. Do you have any other idea?

Thanks

Erik Scheffers

unread,
Nov 24, 2010, 8:17:39 AM11/24/10
to peach³ support

> I wonder why its loading that plug in when HAVE_COMPARISON is False,
> and development.py is not in use. Do you have any other idea?

I've done some testing and was able to reproduce your problem, and I
have been able to track it down to a bug in Django:
http://code.djangoproject.com/ticket/12064

A temporary fix is to create an empty file where the included template
is expected: peach3/course/panel/plugin/comparison.jstpl

Thanks for reporting this!

noel

unread,
Nov 24, 2010, 8:26:55 AM11/24/10
to peach³ support
Thanks a lot! It worked!
Reply all
Reply to author
Forward
0 new messages