summaryrefslogtreecommitdiff
path: root/django/contrib/staticfiles/utils.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-03 11:20:46 +0100
committerGitHub <noreply@github.com>2022-02-03 11:20:46 +0100
commitc5cd8783825b5f6384417dac5f3889b4210b7d08 (patch)
tree3d4689aaa0e209e40d2d8df09edad7e155960b45 /django/contrib/staticfiles/utils.py
parentc9d6e3595cfd0aa58cde1656bd735ecfcd7a872b (diff)
Refs #33476 -- Refactored problematic code before reformatting by Black.
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
Diffstat (limited to 'django/contrib/staticfiles/utils.py')
-rw-r--r--django/contrib/staticfiles/utils.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/django/contrib/staticfiles/utils.py b/django/contrib/staticfiles/utils.py
index 5c0a85a451..e4297aff2b 100644
--- a/django/contrib/staticfiles/utils.py
+++ b/django/contrib/staticfiles/utils.py
@@ -50,8 +50,9 @@ def check_settings(base_url=None):
"You're using the staticfiles app "
"without having set the required STATIC_URL setting.")
if settings.MEDIA_URL == base_url:
- raise ImproperlyConfigured("The MEDIA_URL and STATIC_URL "
- "settings must have different values")
+ raise ImproperlyConfigured(
+ "The MEDIA_URL and STATIC_URL settings must have different values"
+ )
if (settings.DEBUG and settings.MEDIA_URL and settings.STATIC_URL and
settings.MEDIA_URL.startswith(settings.STATIC_URL)):
raise ImproperlyConfigured(
@@ -59,5 +60,6 @@ def check_settings(base_url=None):
)
if ((settings.MEDIA_ROOT and settings.STATIC_ROOT) and
(settings.MEDIA_ROOT == settings.STATIC_ROOT)):
- raise ImproperlyConfigured("The MEDIA_ROOT and STATIC_ROOT "
- "settings must have different values")
+ raise ImproperlyConfigured(
+ "The MEDIA_ROOT and STATIC_ROOT settings must have different values"
+ )