﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8965	UnicodeEncodeError in template path after migration from Django 0.96 to 1.0	anonymous	nobody	"My templates are in a dir with a non-ascii char. Something like: u""/foo/bar/para'''í'''so/templates"".

With Django-0.96 works fine. With Django-1.0 internal testing server (./manage.py runserver) works fine too. But with apache and mod_python throws an UnicodeEncodeError ('ascii' codec can't encode character u'\xed' in position 13: ordinal not in range(128)) in /var/lib/python-support/python2.5/django/template/loaders/filesystem.py, in load_template_source:

{{{
return (open(filepath).read().decode(settings.FILE_CHARSET), filepath)
}}}
 

settings.FILE_CHARSET is ""utf-8"". filepath is something like u""/foo/bar/paraíso/templates/foobar.html"". It comes from TEMPLATE_DIRS in settings.py, that it looks like:

{{{
TEMPLATE_DIRS = (unicode(os.path.join(os.path.dirname(__file__), 'templates').replace('\\','/'), ""utf-8""), )
}}}


If I put template dir without unicode conversion both runserver and mod_python+apache gives a ""cannot extend foobar.html because template doesn't exist"" error.
"		closed	Uncategorized	1.0		fixed			Unreviewed	0	0	0	0	0	0
