B
B
blazer052016-02-03 11:17:37
Django
blazer05, 2016-02-03 11:17:37

Unresolved links in code, how to fix?

Hello.
Help to deal with the problem of code highlighting in pycharm in yellow. I understand this warning, but I don’t understand how to fix the problem?
a5ee43e3474f429a8cc46510b44bd215.jpg
The pycharm bootstrap connections are highlighted in yellow, but everything works. On hover it says:
Unresolved template reference ''bootstrap/css/bootstrap.min.css'' less... (Ctrl+F1)
This inspection highlights unresolved file references in string literals of 'extends' and 'include' Django tags.
What does unresolved links mean in translation.
Unresolved link template ''bootloader/css/bootstrap.min.css'' less... (Ctrl+F1)
This inspection highlights unresolved file links in string literals 'pass through' and '' include Django tags.
If I change the path to the bootstrap files like this

<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">

then the bootstrap does not work - there is no design, it only works in one position
<link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">

In another similar test project, this is not the case, but I can not find the reason for this!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oscar Django, 2016-02-03
@winordie

Fuck it, it's all good

A
Alexey, 2016-02-03
@MAKAPOH

My static from applications is picked up automatically. Additional directories in STATICFILES_DIRS are defined like this:

BASE_DIR = path.abspath(path.join(path.dirname(__file__), '..', '..'))
STATICFILES_DIRS = (
    path.join(BASE_DIR, 'src', 'ui', 'static_dev'),
)

Try defining paths in the same way, it might work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question