1
0
mirror of https://github.com/django/django.git synced 2025-10-30 00:56:09 +00:00

[1.5.x] Fixed #19357 -- Allow non-ASCII chars in filesystem paths

Thanks kujiu for the report and Aymeric Augustin for the review.
Backport of c91667338 from master.
This commit is contained in:
Claude Paroz
2012-12-08 11:13:52 +01:00
parent a0578a1a1c
commit 4214a22e06
56 changed files with 228 additions and 147 deletions

View File

@@ -33,6 +33,7 @@ from django.utils.cache import get_max_age
from django.utils.encoding import iri_to_uri, force_bytes
from django.utils.html import escape
from django.utils.http import urlencode
from django.utils._os import upath
from django.utils import six
from django.test.utils import override_settings
@@ -633,7 +634,7 @@ class AdminViewFormUrlTest(TestCase):
Refs #17515.
"""
template_dirs = settings.TEMPLATE_DIRS + (
os.path.join(os.path.dirname(__file__), 'templates'),)
os.path.join(os.path.dirname(upath(__file__)), 'templates'),)
with self.settings(TEMPLATE_DIRS=template_dirs):
response = self.client.get("/test_admin/admin/admin_views/color2/")
self.assertTrue('custom_filter_template.html' in [t.name for t in response.templates])