I am following this guide on deploying a django app to AWS Elastic Beanstalk : https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
After running eb open, the css for the admin site does not render. It works when running the development server at 127.0.0.1:8000/admin but not when deployed to EB.
I have followed this guidance but it is still not working Elastic Beanstalk does not load the Django admin static files
Can someone explain why this is happening?
You can create a .ebextension/djnago.config in your project root dir. And code for loading static assests is below:
option_settings:
aws:elasticbeanstalk:environment:proxy:staticfiles:
/static: static
I used this for django 4.0 on Amazon Linux 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With