From 939fd4f0c09fbc185f058036375091281cc89273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Vinot?= Date: Mon, 5 Feb 2024 13:48:33 +0100 Subject: [PATCH] Delete a warning with Python 3.12 --- grappelli/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grappelli/settings.py b/grappelli/settings.py index b8a07b310..6a1fb95ce 100644 --- a/grappelli/settings.py +++ b/grappelli/settings.py @@ -24,7 +24,7 @@ # SWITCH_USER_ORIGINAL: Defines if a user is a valid target. # Gets a user object and returns True/False. SWITCH_USER_TARGET = getattr(settings, "GRAPPELLI_SWITCH_USER_TARGET", lambda original_user, user: user.is_staff and not user.is_superuser) -SWITCH_USER_REGEX = getattr(settings, "GRAPPELLI_SWITCH_USER_REGEX", "\d+") +SWITCH_USER_REGEX = getattr(settings, "GRAPPELLI_SWITCH_USER_REGEX", r"\d+") # CLEAN INPUT TYPES # Replaces input types: search, email, url, tel, number, range, date