PolarBear10
PolarBear10

Reputation: 2305

Pycharm does not load find my static files

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

Upvotes: 0

Views: 143

Answers (1)

geekandglitter
geekandglitter

Reputation: 390

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.")

Upvotes: 2

Related Questions