Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ch17, Page 256: "DJANGO_DEBUG=False" creates bugs #309

Open
machib77 opened this issue Oct 14, 2023 · 1 comment
Open

Ch17, Page 256: "DJANGO_DEBUG=False" creates bugs #309

machib77 opened this issue Oct 14, 2023 · 1 comment

Comments

@machib77
Copy link

After changing to "DJANGO_DEBUG=False" on the new file docker-compose-prod.yml, I spin down the Docker container and start it up again as instructed, and the page http://127.0.0.1:8000/debug behaves as expected, but the rest of the existing pages show problems:

Images won't load and on the books page the list looks cut off.

@HBarotov
Copy link

HBarotov commented Jul 5, 2024

Hi,

Kind of late to respond, but this is the expectted behavior. When DEBUG=False, Django does not serve static and media files. One possible way is to create staticfiles and mediafiles volumes inside Docker.

You can learn more about them in this tutorial: Dockerizing Django with Postgres, Gunicorn, and Nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants