DebbieBergstrom / realDreamsCo

https://real-dreams-co-a66bd587b968.herokuapp.com/
0 stars 1 forks source link

[BUG]: Product details page error 500 in production #55

Closed DebbieBergstrom closed 4 months ago

DebbieBergstrom commented 6 months ago

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