[Fixed]-{{object.image.url}} and {{object.image.path}} show as unknown in template where as {{object.image]} shows the path [Django]

1👍

What’s happening is that you’re using .values() which returns a dict where n["image"] is not an object, but rather a url.

In your view, where you wrote the small test code, you didn’t use values(), so you got an object back where conss.image is an ImageFieldFile object where a url attribute is the path.

Thus the different behavior.

👤NS0

Leave a comment