Error deploy Heroku app Django

Asked

Viewed 250 times

2

After deploying to Heroku, I opened the link to my application (https://silima.herokuapp.com/), and it presented the following error:

    ProgrammingError at /
relation "Produto" does not exist
LINE 1: ..., "Produto"."criado", "Produto"."modificado" FROM "Produto" ...
                                                             ^
Request Method: GET
Request URL:    https://silima.herokuapp.com/
Django Version: 2.0.3
Exception Type: ProgrammingError
Exception Value:    
relation "Produto" does not exist
LINE 1: ..., "Produto"."criado", "Produto"."modificado" FROM "Produto" ...
                                                             ^
Exception Location: /app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py in _execute, line 85
Python Executable:  /app/.heroku/python/bin/python
Python Version: 3.6.3
Python Path:    
['/app',
 '/app',
 '/app/.heroku/python/lib/python36.zip',
 '/app/.heroku/python/lib/python3.6',
 '/app/.heroku/python/lib/python3.6/lib-dynload',
 '/app/.heroku/python/lib/python3.6/site-packages']
Server time:    Qua, 23 Mai 2018 10:22:22 -0300
  • After deploying, you ran Django database migrations?

1 answer

0


If you didn’t have any issues deploying, I imagine you added the Postgres add-on. Then the heroku run python manage.py migrate should solve the problem. Remembering that before you have to be logged in (heroku login).

  • Ball show, that was it, I forgot to give the migrate, it worked, now I have one more doubt, some images Django did not render on my page, are not all, just a few. I’m forgetting one thing ?

  • Depends. Would be images you uploaded?

  • So, these images are in a folder inside the Static folder, strange that other images worked.

  • @Gabrielgeorge I think the best would be to create a new question and play there the details, as the directory tree of your project, your settings.py and etc

  • Yes, true ! I’ll do it anyway, thank you very much for the strength!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.