diff --git a/django/contrib/staticfiles/utils.py b/django/contrib/staticfiles/utils.py
index 3d28c90f47..dbab4a68d3 100644
a
|
b
|
|
1 | 1 | import fnmatch |
2 | 2 | import os |
| 3 | import warnings |
3 | 4 | |
4 | 5 | from django.conf import settings |
5 | 6 | from django.core.exceptions import ImproperlyConfigured |
… |
… |
def check_settings(base_url=None):
|
56 | 57 | (settings.MEDIA_ROOT == settings.STATIC_ROOT)): |
57 | 58 | raise ImproperlyConfigured("The MEDIA_ROOT and STATIC_ROOT " |
58 | 59 | "settings must have different values") |
| 60 | if settings.MEDIA_URL and base_url and settings.MEDIA_URL.startswith(base_url): |
| 61 | warnings.warn("The contrib.staticfiles app will not serve media if MEDIA_URL is within STATIC_URL") |