diff options
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/base.py | 2 | ||||
| -rw-r--r-- | django/template/defaultfilters.py | 2 | ||||
| -rw-r--r-- | django/template/defaulttags.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/django/template/base.py b/django/template/base.py index 778d82be55..13037c31aa 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -639,7 +639,7 @@ filter_raw_string = r""" )""" % { 'constant': constant_string, 'num': r'[-+\.]?\d[\d\.e]*', - 'var_chars': "\w\.", + 'var_chars': r'\w\.', 'filter_sep': re.escape(FILTER_SEPARATOR), 'arg_sep': re.escape(FILTER_ARGUMENT_SEPARATOR), } diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index e3dc48e474..b258cf269b 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -259,7 +259,7 @@ def stringformat(value, arg): def title(value): """Converts a string into titlecase.""" t = re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title()) - return re.sub("\d([A-Z])", lambda m: m.group(0).lower(), t) + return re.sub(r"\d([A-Z])", lambda m: m.group(0).lower(), t) @register.filter(is_safe=True) diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index ece6f7501d..71fcbbaab3 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -1329,7 +1329,7 @@ def templatetag(parser, token): @register.tag def url(parser, token): - """ + r""" Return an absolute URL matching the given view with its parameters. This is a way to define links that aren't tied to a particular URL |
