Skip to content Skip to sidebar Skip to footer

Change Django's Default Static Directory

I got an issue with Django 1.6: I want to change the default static file directory in django. I don't want it in project/myapp/static but in project/static I readed django's docum

Solution 1:

Your STATIC_ROOT shouldn't be in STATICFILES_DIRS. STATICFILES_DIRS should contain paths to your project's static files. STATIC_ROOT is where all your static files are collected when you run collectstatic.

If you run django server with DEBUG=True, server will serve static files straight form STATICFILES_DIRS, and if DEBUG=False it won't handle static files at all. In that case you can run django server with option --insecure.

See this related question for more.

Post a Comment for "Change Django's Default Static Directory"