0

Is there any way to ignore these kind of errors (django expressions)? The code works perfectly, but VS Code is triggering those errors, which I find visually distracting.

enter image description here

enter image description here

starball
  • 20,030
  • 7
  • 43
  • 238
Paul Viorel
  • 234
  • 1
  • 11
  • What (programming/markup) language mode is currently active for this file? If it's using a wrong one, set it to the right one (use the bottom right selection input or the `Change Language Mode` command in the command palette). If the correct language mode doesn't exist, look for an extension that provides it. – starball Feb 17 '23 at 09:42
  • Please [edit] to provide enough info to reproduce the problem. – starball Feb 17 '23 at 09:48

1 Answers1

2

You just need to install an extension that provides language support for Django templates. Go search for one that works for you on the Visual Studio Marketplace or in the extensions view of VS Code.

I'd list some extensions on the marketplace, but in the interest of being non-biased and not having to come and maintain a list when new ones come out in the future, I won't. (There's also the fact that Stack Overflow is not a platform for software recommendations (see #3 of /help/on-topic)).

Now, if you really just want to disable problem highlighting, see How can I easily toggle display of problem underlining in VS Code editor panels?

starball
  • 20,030
  • 7
  • 43
  • 238