Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The STATICFILES_DIRS setting is not a tuple or list. Eventhough it did not contain a comma

Tags:

python

static

HI I am new to static files but I got this error called STATICFILES_DIRS setting is not a tuple or list. Which I do not understand as it is does not contain any commas. I hope someone can help me. Yes, I have imported os. Traceback:

ERRORS:
?: (staticfiles.E001) The STATICFILES_DIRS setting is not a tuple or list.
        HINT: Perhaps you forgot a trailing comma?

settings.py:

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


STATICFILES_DIRS = (
    os.path.join(BASE_DIR, '')
    )
like image 411
Kaushik Avatar asked Oct 19 '25 07:10

Kaushik


1 Answers

Thanks to @fsimonjetz for helping me answer this question I changed this:

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

)

to

 STATICFILES_DIRS = (os.path.join(BASE_DIR, ''),)
like image 74
Kaushik Avatar answered Oct 20 '25 20:10

Kaushik