in the index.html that is inside teh te template folder it appears a message error here is the shot-screen
i reaad again all the files and it seems allg well written, what can i do to solve the problem ?.
Thank you in advance
in the index.html that is inside teh te template folder it appears a message error here is the shot-screen
What you’re looking at are possible errors detected by the IDE. Whether or not they’re real errors is a completely different question. Very few (if any) IDEs know how to dynamically interpret Django templates. As a result, errors reported by an IDE tend to be misleading.
So, the only real question here is, does the template work as expected? Does it generate the expected HTML? If so, then you can ignore those errors.
Quotation marks and double quotation marks are used interchangeably in html tags.
<dom attr="{'django "this is problem" template'}"
Do not mix quotation marks.
Yes and no. In the code showing, one of the highlighted bits is:
style='background-image: url("{% static 'assets/img/more-services-1.jpg' %}");'
Which is OK because Django will parse that and render something like this (depending on the static url):
style='background-image: url("/static/assets/img/more-services-1.jpg");'
Which is also OK.
The problem is that the editor thinks this is a plain HTML file so it doesn’t take the Django tags into account. So it complains about the outer single quotes containing another pair of single quotes inside.
The best solution would be to use a VSCode extension that correctly parses and syntax-highlights templates like these, so that it doesn’t complain about this. (I’m not at my computer and can’t recall which one I use, sorry.)