Django 1.7 - Serving static files

前端 未结 4 1432
执念已碎
执念已碎 2021-01-28 08:22

I\'m following the official documentation in order to serve static files but I\'m recieving error 404 in the development console. I\'m using \'django.contrib.staticfiles\', so s

4条回答
  •  一个人的身影
    2021-01-28 08:42

    SOLUTION: I was missing this line in my settings.py

    STATICFILES_DIRS = (os.path.join(os.path.dirname(__file__),'static'),)
    

    It looks it's mandatory, same as TEMPLATE_DIRS.

提交回复
热议问题