mirror of
https://github.com/django/django.git
synced 2025-07-22 20:55:17 +00:00
Fixed #25567 -- Removed obsolete MEDIA_URL fallback in Media.absolute_path
This commit is contained in:
parent
6ff500127a
commit
f59a0401e5
2 changed files with 7 additions and 531 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue