Using WhiteNoise for static files
Serve static files directly from your project
We are mostly following the Using WhiteNoise with Django guide here, but with some specific changes for the Lambda environment.
We'll use pip to install WhiteNoise:
Configure Django Settings#
Now edit the Django settings file to support WhiteNoise settings. Add these lines to the bottom of the file. This will enable WhiteNoise to be the default for static files.
And then add the WhiteNoise middleware right after