Hello,
I've got the following code in my template, which works fine on my computer:
{% if car_image.is_file %}
<img src="/static/reviews/images/{{ car }}.jpg" class="img-responsive">
{% else %}
<h2><a href="" class="btn btn-primary btn-lg">Suggest a picture for this car</a></h2>
{% endif %}
However, it doesn't seem to work on PythonAnywhere: Second part of my if statement i.e. suggest button is shown even though that image exists.
If I remove ".is_file", car_image appears without problem.
Any suggestion or feedback will be welcomed and greatly appreciated.
Thank you.