Django – Display ImageField

An ImageField contains a url attribute, which you can use in your templates to render the proper HTML.

{% block content %}
    <img src="https://stackoverflow.com/questions/17846290/{{ carx.photo.url }}">
{% endblock %}

Leave a Comment