Static files not working

my static files are not getting implemented ,i have tried everything but they are not working, plz resolve my problem of static files

Setting up static files can be tricky in Django. There are a few points to note

  1. Django doesn’t support serving static files. That means when you change DEBUG to false in settings.py file django won’t serve static files for you
  2. Out of the box there is no settings for serving static files even in development mode

Solution:

  1. Using Django’s internal support for serving static files in Development mode:
    1. Make sure you have django.contrib.staticfiles in you INSTALLED_APPS
    2. Add a STATIC_URL in you settings.py file
    3. Add a STATICFILES_DIRS in you settings.py file which will be a list of all the directories where your static files live
    4. Restart the server and done !
  2. Use 3rd party libraries to serve static files. In Django - Portfolio Project 1 video you can skip to 8:55 and there you’ll find the way to setup whitenoise to serve your static files.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.