Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed loaddata for Django checkouts with non ASCII chars in the name.

  • Loading branch information...
commit c9d07d251fc68fe1a80c2a49e183bbef546238d9 1 parent 6900cb7
Florian Apolloner authored June 03, 2013
3  django/core/management/commands/loaddata.py
@@ -16,6 +16,7 @@
16 16
 from django.db.models import get_app_paths
17 17
 from django.utils.encoding import force_text
18 18
 from django.utils.functional import cached_property, memoize
  19
+from django.utils._os import upath
19 20
 from itertools import product
20 21
 
21 22
 try:
@@ -237,7 +238,7 @@ def fixture_dirs(self):
237 238
                 dirs.append(d)
238 239
         dirs.extend(list(settings.FIXTURE_DIRS))
239 240
         dirs.append('')
240  
-        dirs = [os.path.abspath(os.path.realpath(d)) for d in dirs]
  241
+        dirs = [upath(os.path.abspath(os.path.realpath(d))) for d in dirs]
241 242
         return dirs
242 243
 
243 244
     def parse_name(self, fixture_name):
2  django/utils/_os.py
@@ -38,7 +38,7 @@ def upath(path):
38 38
     """
39 39
     Always return a unicode path.
40 40
     """
41  
-    if not six.PY3:
  41
+    if not six.PY3 and not isinstance(path, six.text_type):
42 42
         return path.decode(fs_encoding)
43 43
     return path
44 44
 

0 notes on commit c9d07d2

Please sign in to comment.
Something went wrong with that request. Please try again.