models
image_url = models.ImageField(upload_to="uploads/shows",blank=True,null=True)
I am having image_url which I need to parse it using JSON object to my android application. I only need the URL of the image(absolute/relative).
I have tried
image_url=myObj.file.url
image_url=myObj.image_url
The correct working solution as provided by @alecxe is
image_url =myObj.image_url.url
来源:https://stackoverflow.com/questions/18740651/django-get-imagefield-path