Django static files can be confusing to setup - especially if you're a beginner. The word "static" sounds mysterious, convoluted and like jargon. I guess there's not one-word to describe CSS, Javascript and Images... so they chose "static" files.
Anyways, even if you've setup Django static files in the past, just REMEMBERING what STATIC_URL, STATICFILES_DIRS and STATIC_ROOT can be difficult if some time has passed and you aren't knee-deep in Django projects all the time.
For these reasons, I wanted to make this video explaining my CURRENT understand (as of 5/30/2019) of Django static files. Use this video as a reference the next time you need to setup static files in Django.
In this Django tutorial, I will first discuss what Django static files, what the staticfiles app is, and what the settings.py variables mean and do.
For example, it's not obvious that "STATIC_URL" is simply a URL prefix for the "STATIC_ROOT" and it's easy to be confused when you hear the words "STATIC_URL" and "STATIC_ROOT" - not intuitive unless you actually know what these do!
Furthermore, when you go to setup static files locally in your Django project, you will likely find it piecemeal - some from the Django documentation, some from StackOverflow and some from YouTube videos.
That's why I wanted a single video to really show what everything means and how to setup Django local static files!
If anything I said in this video is misleading or inaccurate, please do bring it up. I welcome the feedback. I always learn more when I make a mistake than I do when I don't.
So if you're ready to understand Django static files, watch this video all the way through so you see the static files example and walkthrough at the end.
Helpful links:
https://docs.djangoproject.com/en/2.2...
https://docs.djangoproject.com/en/2.2...
https://stackoverflow.com/questions/1...
#Python #Django #StaticFiles
Watch video Understanding Django Static Files online, duration hours minute second in high quality that is uploaded to the channel Jarad Python 30 May 2019. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 23,192 times and liked it 668 visitors.