4 ways to serve static files in Django
Вставка
- Опубліковано 21 лип 2024
- Django in development can serve its own static files. But when deployed in production, Django needs to rely on another method to serve its static content.
In this video, we look at the 4 common ways to serve Django's static files.
Those include the built-in development server, the whitenoise module, a web server like Nginx and S3 buckets.
Chapters:
---------------
0:00 intro
0:15 development server
3:18 whitenoise module
4:56 Nginx
5:47 S3 bucket
7:52 outro
Thank you a thousand times. You saved me a lot of debug time.. I was struggling to debug and it turns out that gunicorn was not serving my static files by default
Thank you for this, really helped me figure out why static files were not available after deployment. Best of luck with the channel, subscribed! :)
Thank you very very much!!! I was having a lot of problems in production and this video saved me!
excellent explanation, the best i found on youtube. You are great teacher, thanks.
Thank you for your content, I am from Venezuela and I am starting as a backend developer in django
wtf!! this channel is pure gold! thx for all
😂 👍
great video! really helpfull, had to change some things for my project, but keep it up.
I lost 3 days testing and modifiying settings. Here was the right configuration of whitenoise!! Thanks a lot!!
you are talking about the deployment in render, righT? because i am fighting because my static resources are not showing.
very helpful video!
shit, I have spent more than one month just to figure out 1 way to handle static file in django.
Thank you so much
Thank you for helping me remember how to configure collectstatic.
I've used nginx, it's pretty convenient to do in containers and automatically have Django collect static into a volume shared with nginx, then reboot the nginx container and voila🎉
great video man, thanks
Great content! Keep going :D
Thank you :)
You're so good!
Thank you
Perfect ❤
What should be done if the user does not detect any changes in a static file? For example, I make a change in main.js and the user does not see it. (AWS s3 bucket)
what am I suppoed to add in Static url
where can I find the AWS S3 CUSTOM Domain and s3 static dir
Thanks!
Can i use whitenoice for media_url??? I have problem when i uploading image with imageField , image doesn't serve
should u run colelctic static before deployment will that work??
which is better
nginx or whitenoise for serving static files?🤔
I like your voice so I HIT the BELL!
Serving static files through NGINX, are they cached by default?
love the explanations, hate the keyboard sound
Yea that keyboard sound is annoying
i love teacher :):):):):)
Teamooo
Thank you