From fe208e984435efdc4922fd8a7591fdfc4c257852 Mon Sep 17 00:00:00 2001 From: Daniel Latzer Date: Sat, 2 Dec 2023 09:42:29 +0100 Subject: [PATCH] Fix parsing DATABASE_URL with port number --- recipes/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/settings.py b/recipes/settings.py index f966e419..86739628 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -350,7 +350,7 @@ WSGI_APPLICATION = 'recipes.wsgi.application' # Load settings from env files if os.getenv('DATABASE_URL'): match = re.match( - r'(?P\w+):\/\/(?:(?P[\w\d_-]+)(?::(?P[^@]+))?@)?(?P[^:/]+)(?:(?P\d+))?(?:/(?P[\w\d/._-]+))?', + r'(?P\w+):\/\/(?:(?P[\w\d_-]+)(?::(?P[^@]+))?@)?(?P[^:/]+)(?::(?P\d+))?(?:/(?P[\w\d/._-]+))?', os.getenv('DATABASE_URL') ) settings = match.groupdict()