Answer the question
In order to leave comments, you need to log in
How to work with static files in Django?
Hello. I do not understand why templates do not find statics in Django (1.11)
I do this.
Fundamentally! I create a static folder, throw statics there, in the settings I do this:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/style.css' %}">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question