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

Serve static files via WhiteNoise #68

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

dozed
Copy link
Contributor

@dozed dozed commented Nov 15, 2023

By default, Django refuses to serve static files in production mode (DEBUG = False) in order to encourage the use of solutions for a more efficient serving of static files. We now use WhiteNoise, which does make the serving of static files more efficient within our application, so that we don't have to configure an external service like the web server. For more information, see https://whitenoise.readthedocs.io/en/latest/django.html .

@hannahbast hannahbast changed the title Integrated WhiteNoise to serve static files in production mode Serve static files via WhiteNoise Dec 15, 2023
@hannahbast
Copy link
Member

@dozed I also merged the current master into this one, revised the description and tested it together with the no-slug-mode PR (in production mode). It all worked fine. Please have another look yourself and if you agree, I would be happy to also merge this one.

@dozed
Copy link
Contributor Author

dozed commented Dec 15, 2023

I did a test and the PR looks good to me. Thanks again!

Copy link
Member

@hannahbast hannahbast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, Stefan, this is very useful and seems to work perfectly

@hannahbast hannahbast merged commit 254a5db into ad-freiburg:master Dec 15, 2023
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

Successfully merging this pull request may close these issues.

2 participants