diff options
| author | Marko Tibold | 2012-11-14 21:40:52 +0100 |
|---|---|---|
| committer | Marko Tibold | 2012-11-14 21:40:52 +0100 |
| commit | e112a806d863c0d6662dc3a65909ac191c02f03e (patch) | |
| tree | 13f2fd9f7479a91151b803c907e1359ac040362b /rest_framework/fields.py | |
| parent | c35b9eb065b2a9cacaee1dc0849f01f3483e6130 (diff) | |
| download | django-rest-framework-e112a806d863c0d6662dc3a65909ac191c02f03e.tar.bz2 | |
.to_native() now returns the file-name.
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index dce31c5a..fd57aa2c 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -952,10 +952,7 @@ class FileField(WritableField): return data def to_native(self, value): - """ - No need to return anything, the file can be accessed form its url. - """ - return + return value.name class ImageField(FileField): |
