1👍
✅
I guess it works on your computer,but not in heroku. It may be problem with data base.
Try to makemigrations
and migrate
. Check that this base post is exist in data base in development.
You could try to add some exception in html, like:
{% if posts %}
{% for post in posts %}
<your code>
{% else %}
<p>We have not any posts</p>
{% ednif %}
Source:stackexchange.com