0

Pycharm cannot find my css files. In the screenshot, the settings.py is shown, along with the directory where the .css is located and the terminal giving back a 404. Can someone kindly point to me where is the problem ?

enter image description here

PolarBear10
  • 2,065
  • 7
  • 24
  • 55

1 Answers1

2

Use STATICFILES_DIRS instead of STATIC_ROOT, like this:

STATICFILES_DIRS = os.path.join(BASE_DIR, 'static')

Here's a SO explanation of the difference between STATICFILES_DIRS and STATIC_ROOT (scroll down to the section that starts with: "...Development STATIC_ROOT is useless during development, it's only required for deployment.")

geekandglitter
  • 342
  • 2
  • 15
  • 1
    please change it to `STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]` as STATICFILES_DIRS need to be a list rather than tuple and it works :) – PolarBear10 Apr 03 '19 at 15:43