The 'image' attribute has no file associated with it django


I am doing an ecommerce project for deployment in, some error is coming
I would really appreciate if any one could help me to find out the problem as I am a basic learner

I have developed a online book store application with python and django,I have two MySQL tables for category and products , while running in local host it works perfectly, but the deployment in pythonanywhere only got problem in images field, also static path given

errorenter image description here

enter image description here

Asked By: Raseena Anwar



Need to Check image is not None with if condition

            <th>First Name</th>
            <th>last Name</th>
        {% for i in data %}
                {% if i.image %} # need to check image is not None, this if check if image then render it else not
                {% endif %}
        {% endfor %}

I found that the problem was one of the image field was none, I checked the admin panel where all the records had images except one row with image attribute empty.After adding image it works perfectly.

Answered By: Raseena Anwar