0

When I upload the project to heroku, and change DEBUG=True to DEBUG=False, the images stop showing

That's my static and media root

STATIC_ROOT = Path(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'

MEDIA_ROOT = Path(BASE_DIR, 'media')
MEDIA_URL = '/media/'

1 Answer 1

0

Essentially, by changing debug to false, you've put django into 'production' mode, which changes what is necessary for static files to be found. This is done because the 'dev' method is not proven secure.

For what to do in horoku, the horoku documentation has you covered:

For more information, the django docs talk about the process as well

Sign up to request clarification or add additional context in comments.

2 Comments

My static files are working fine, my problem is only with media files
Media files are a different kettle of fish. Try stackoverflow.com/questions/41474150/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.