Skip to content

ImageFields can return urls rather than file paths #1889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

kakulukia
Copy link

ImageFields can show_urls=True instead of file names

ImageFields can show_urls=True instead of file names
@kakulukia
Copy link
Author

ahhh dammit .. the whitespace comes from the github editor .. im fixing it :)

fix whitespace bug ..
@tomchristie
Copy link
Member

We need to consider:

  • FileField
  • Documentation.
  • Returning absolute URLs rather than relative URLs.
  • Using this style globally.

@kakulukia
Copy link
Author

I'll see what I can do about the remaining points over the weekend :-)
But the decision is up to you.

My use case is that I store the images inside S3 so I have absolute URLs anyway. And that's why the relative stuff or the current file name is of no use for me.

That's why I changed it in the first place.

@tomchristie tomchristie added this to the 3.0 Release milestone Sep 29, 2014
@tomchristie tomchristie mentioned this pull request Sep 29, 2014
94 tasks
… methon on the object itself

try to call the given serializer method on the serializer itself and on the model in that order
# By kakulukia
# Via kakulukia
* 'master' of github.com:kakulukia/django-rest-framework:
  allow to work like in django admin which also tries to call the given methon on the object itself
  Update fields.py

Conflicts:
	rest_framework/fields.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants