Django staticfiles.W004 warning when using os.path.join

85 Views Asked by At

I'm getting this warning:

?: (staticfiles.W004) The directory '/home/user/Desktop/Projects/project/project/project/static' in the STATICFILES_DIRS setting does not exist.

But only when I use this definition for the staticfiles dir

BASE_DIR = Path(__file__).resolve().parent.parent
STATICFILES_DIRS = [os.path.join(BASE_DIR, '/static')]

If I use this instead

STATICFILES_DIRS = ['/home/user/Desktop/Projects/project/project/project/static']

I have no issue.

0

There are 0 best solutions below