solution to static file loading issue on 1.8

27 views
Skip to first unread message

Becka R.

unread,
Oct 23, 2015, 12:18:13 PM10/23/15
to Django users
Hi,

I just spent  hours on this problem, and (at last) stumbled into the Stack Overflow answer, and wanted to preserve this for posterity.

I'm using Django 1.8, and wasn't able to get my static files to load on my local server.  I finally found the Stack Overflow answer that made all the difference - pasted below.

I haven't seen this in the official docs for Django 1.8.  

Snippet below: 

I put this in my settings.py:

STATICFILES_FINDERS = (
    "django.contrib.staticfiles.finders.FileSystemFinder",
    "django.contrib.staticfiles.finders.AppDirectoriesFinder",
)
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static"),
)

Tim Graham

unread,
Oct 23, 2015, 1:25:23 PM10/23/15
to Django users
Hi Becka,

You've provided the default value for STATICFILES_FINDERS so putting that in your settings shouldn't make a difference. An example of STATICFILES_DIRS is given at:

https://docs.djangoproject.com/en/1.8/howto/static-files/

If you have a suggestion about how to improve the docs that would be welcome.

Becka R.

unread,
Oct 23, 2015, 1:36:43 PM10/23/15
to Django users
Hi, 

I'd love to understand why, exactly, it did make a difference.  All I know for sure is that after four hours of trying various possibilities,  this is what removed the error. 

Thanks!

Tim Graham

unread,
Oct 23, 2015, 1:43:37 PM10/23/15
to Django users
Did you try reading the link I provided? If so, what is unclear?
Reply all
Reply to author
Forward
0 new messages