diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-14 17:24:31 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-14 17:24:31 +0200 |
| commit | 7d48e077b573afb4184301be6565a88e8a9b6e28 (patch) | |
| tree | 3bc5b9adb2fa82269a988bf027508a50e9490f19 /django | |
| parent | 9cb80356fc4cff7b8ecda91877755d6e361667c4 (diff) | |
[py3] Fixed staticfiles tests
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/staticfiles/storage.py | 4 | ||||
| -rw-r--r-- | django/utils/encoding.py | 2 |
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 |
