mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Removed MEDIA_URL from django-rest-framework settings. Using Django's MEDIA_URL
This commit is contained in:
parent
e01974ee07
commit
c57d80d2a0
|
@ -974,7 +974,7 @@ class FileField(WritableField):
|
||||||
|
|
||||||
def to_native(self, value):
|
def to_native(self, value):
|
||||||
if api_settings.PREPEND_MEDIA_URL:
|
if api_settings.PREPEND_MEDIA_URL:
|
||||||
return api_settings.MEDIA_URL + value.name
|
return settings.MEDIA_URL + value.name
|
||||||
return value.name
|
return value.name
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,6 @@ DEFAULTS = {
|
||||||
|
|
||||||
# Prepending MEDIA_URL to FileField
|
# Prepending MEDIA_URL to FileField
|
||||||
'PREPEND_MEDIA_URL': False,
|
'PREPEND_MEDIA_URL': False,
|
||||||
'MEDIA_URL': '/',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user