summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-08-14 17:24:31 +0200
committerClaude Paroz <claude@2xlibre.net>2012-08-14 17:24:31 +0200
commit7d48e077b573afb4184301be6565a88e8a9b6e28 (patch)
tree3bc5b9adb2fa82269a988bf027508a50e9490f19 /django
parent9cb80356fc4cff7b8ecda91877755d6e361667c4 (diff)
[py3] Fixed staticfiles tests
Diffstat (limited to 'django')
-rw-r--r--django/contrib/staticfiles/storage.py4
-rw-r--r--django/utils/encoding.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py
index 3b431edf94..1c841e9889 100644
--- a/django/contrib/staticfiles/storage.py
+++ b/django/contrib/staticfiles/storage.py
@@ -51,8 +51,8 @@ class CachedFilesMixin(object):
default_template = """url("%s")"""
patterns = (
("*.css", (
- br"""(url\(['"]{0,1}\s*(.*?)["']{0,1}\))""",
- (br"""(@import\s*["']\s*(.*?)["'])""", """@import url("%s")"""),
+ r"""(url\(['"]{0,1}\s*(.*?)["']{0,1}\))""",
+ (r"""(@import\s*["']\s*(.*?)["'])""", """@import url("%s")"""),
)),
)
diff --git a/django/utils/encoding.py b/django/utils/encoding.py
index 633022dd3b..7b80f13496 100644
--- a/django/utils/encoding.py
+++ b/django/utils/encoding.py
@@ -225,7 +225,7 @@ def filepath_to_uri(path):
return path
# I know about `os.sep` and `os.altsep` but I want to leave
# some flexibility for hardcoding separators.
- return quote(smart_bytes(path).replace("\\", "/"), safe=b"/~!*()'")
+ return quote(smart_bytes(path.replace("\\", "/")), safe=b"/~!*()'")
# The encoding of the default system locale but falls back to the
# given fallback encoding if the encoding is unsupported by python or could