summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-06-06 11:40:24 -0400
committerTim Graham <timograham@gmail.com>2018-06-06 12:01:10 -0400
commit744a44dfa1df21d10e19c6928066eb1408993b29 (patch)
tree07160e9eea1950ab40a26ca609fd20f98ab7e2e3 /django
parente072060203aa34e7dcf1917323d8de4cafb6361c (diff)
[2.0.x] Refs #28462 -- Fixed 'invalid escape sequence' warning on Python 3.6+.
Backport of e9bd1a3e12df132527a8d8bea95858e856ac7be4 from master
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/options.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 8d8f263db1..577d7167a5 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -1558,7 +1558,7 @@ class ModelAdmin(BaseModelAdmin):
def _get_edited_object_pks(self, request, prefix):
"""Return POST data values of list_editable primary keys."""
- pk_pattern = re.compile('{}-\d+-{}$'.format(prefix, self.model._meta.pk.name))
+ pk_pattern = re.compile(r'{}-\d+-{}$'.format(prefix, self.model._meta.pk.name))
return [value for key, value in request.POST.items() if pk_pattern.match(key)]
def _get_list_editable_queryset(self, request, prefix):