Django/Heroku Deployment issue OperationalError at / no such table: posts_post

OperationalError at /

нет такой таблицы: posts_post

Django Version: 4.1 Тип исключения: OperationalError Значение исключения:

нет такой таблицы: posts_post

Exception Location: /app/.heroku/python/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py, строка 357, in execute

Восстановлено во время: posts.views.index Python Executable: /app/.heroku/python/bin/python

Ошибка при визуализации шаблона

В шаблоне /app/templates/index.html, ошибка в строке 31 нет такой таблицы: posts_post Код, выделенный в ошибке - это мой файл Index.HTML obj в object_list

       </section>
        <section class="featured-posts no-padding-top">
          <div class="container">
            <!-- Post-->
            {% for obj in object_list %}
          
            <div class="row d-flex align-items-stretch">
              {% if not forloop.first and not forloop.last %}
              <div class="image col-lg-5"><img src="{{ obj.thumbnail.url }}" alt="..."></div>
              {% endif %}
              <div class="text col-lg-7">
                <div class="text-inner d-flex align-items-center">
                  <div class="content">
                    <header class="post-header">
                      <div class="category">'''

Отслеживание файла views.py

/app/posts/views.py, строка 51, in index( Выделенная строка в ошибке return render(request, 'index.html', context))

def index(request):
    featured = Post.objects.filter(featured=True)
    latest = Post.objects.order_by('-timestamp')[0:3]

    if request.method == "POST":
        email = request.POST["email"]
        new_signup = Signup()
        new_signup.email = email 
        new_signup.save()

    context = {
        'object_list': featured,
        'latest': latest
    }
    
    return render(request, 'index.html', context)
    
'''

I have tried solving it by removing pycache from my apps along with making migrations again however it throws same error..
Can anyone here help on this?

Thanks 
Вернуться на верх