I have a folder in my django project called "templates", its linked to my main project which can access the files (HTML...) correctly as I can make it display stuff like "Hello World" but the project considers the files in the folder as django files even though when creating them I typed stuff like "main.css" or "main.html". The issue is it doesnt tell me if I have errors and it doesnt let me autofill so I was wondering if there was a way to fix this. Thx for any answers! Picture of my Project
Edit (Solution) : At the bottom right there was a text with "Django html". I just changed that to html.
CodePudding user response:
On the bottom lower right on your attached picture where it says django.txt, press it. This opens the select language mode utility function. Choose auto detect or the extension if you know it.
This automatically detects the file type and changes it to html or css; depending on the file type.
CodePudding user response:
This issue originates from the IDE that you are using. You need to install an extension on your IDE if HTML/CSS support is not built into it.
If you are using VSCode, you can try installing HTML CSS Support