2👍
First, it looks like there is a mistake in your settings. You should understand the django.contrib.staticfiles collectstatic command:
Collects the static files into STATIC_ROOT.
[…]
Files are searched by using the enabled finders. The default is to look in all locations defined in STATICFILES_DIRS and in the ‘static’ directory of apps specified by the INSTALLED_APPS setting.
So, it seems like a mistake that STATICFILES_DIRS contains STATIC_ROOT, since the contents of STATICFILES_DIR is ment to be copied into STATIC_ROOT by collectstatic.
The url is not necessary. You should either:
- use runserver with DEBUG=True, in that case django will serve static files by default, in doubt use staticfiles_urlpatterns or
- use a real httpd to serve STATIC_ROOT on STATIC_URL, in that case you should generate STATIC_ROOT from STATICFILES_DIRS (and actually each app’s ‘static’ subdir, which is the point) with the command collectstatic
When in doubt, the findstatic command may also prove useful.
django.contrib.staticfiles might look a little confusing at first, but when you understand it fully you love it <3