Fixed #25567 -- Removed obsolete MEDIA_URL fallback in Media.absolute_path

This commit is contained in:
Claude Paroz 2015-10-18 21:15:06 +02:00
parent 6ff500127a
commit f59a0401e5
2 changed files with 7 additions and 531 deletions

View file

@ -81,11 +81,7 @@ class Media(object):
if path.startswith(('http://', 'https://', '/')):
return path
if prefix is None:
if settings.STATIC_URL is None:
# backwards compatibility
prefix = settings.MEDIA_URL
else:
prefix = settings.STATIC_URL
prefix = settings.STATIC_URL
return urljoin(prefix, path)
def __getitem__(self, name):