I connect to the template like this: {% load staticfiles %}

I use it like this: <link href="{{ STATIC_URL }}assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">

In settings.py: STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )

Hierarchy: http://joxi.ru/8AnE5MGSqdG8b2

As displayed on the site: http://joxi.ru/12Mz78BT4NbLKA/ http://joxi.ru/v293dE4sGMlLWr

    2 answers 2

    Error in: <link href="{{ STATIC_URL }}assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    You should: <link href="{% static 'assets/plugins/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">

    • The error still remained, in the 404 console not found - Maxim Stikharev
    • And you added a route for static files - selimoves
    • from django.contrib.staticfiles.urls import staticfiles_urlpatterns - selimoves
    • urlpatterns + = staticfiles_urlpatterns () - selimoves
    • joxi.ru/krDz138T07oLy2 Anyway. - Maxim Stikharev 2:41 pm

    Thank you @selimoves. Commented out STATIC_ROOT indicated in STATIC_URL / static /. And in base.html I made all static files in this format {% static 'url'%} and it all worked!