Describe the bug:
As I've added a new model 'DreamCenter' and added it as a field to the already made 'Products' model, the products_detail view gets a bad request 500 in production, but works fine in development. It's accessible in the admin dashboard in development, but not in production.
Expected behavior:
Products deltail page should render with the content I've made before.
Solution:
I ran the command "heroku run python manage.py showmigrations --app real-dreams-co" to see all migrations made. Discovered this:
products
[X] 0001_initial
[X] 0002_alter_product_size
[ ] 0003_auto_20240304_2220 (migrations not made)
Simply made migrations to the pending migration:
"heroku run python manage.py migrate products --app real-dreams-co"
Deployed again and made sure all worked in deployed site.
Describe the bug: As I've added a new model 'DreamCenter' and added it as a field to the already made 'Products' model, the products_detail view gets a bad request 500 in production, but works fine in development. It's accessible in the admin dashboard in development, but not in production.
Expected behavior: Products deltail page should render with the content I've made before.
Solution: I ran the command "heroku run python manage.py showmigrations --app real-dreams-co" to see all migrations made. Discovered this: products [X] 0001_initial [X] 0002_alter_product_size [ ] 0003_auto_20240304_2220 (migrations not made)
Simply made migrations to the pending migration: "heroku run python manage.py migrate products --app real-dreams-co" Deployed again and made sure all worked in deployed site.
Solved: YES