From e9bd1a3e12df132527a8d8bea95858e856ac7be4 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 6 Jun 2018 11:40:24 -0400 Subject: [PATCH] Refs #28462 -- Fixed 'invalid escape sequence' warning on Python 3.6+. --- django/contrib/admin/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 206e01a2f0..702a9822e1 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -1636,7 +1636,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):