Open lymanjohnson opened 5 years ago
I have the same problem! Has anyone found a solution?
Up ! I just installed django-atom and it doesn't recognize .html django template as well as specific django syntax in .py files. Anyone has a solution ?
same Problem
same problem
Same issue here. Doesn't seem like the dev is following the issues on github though =(
Hey guys, I found a solution to this problem. It involves using a different package similar to this one and tweaking the settings.
Step 1:
Disable django-atom
and install 'django-templates
instead
Step 2: Go to your config.cson file (which you can get to by clicking on the "Atom" tab in the top bar and selecting "Config") and add the lines:
"django-templates":
defaultToDjangoTemplatesForFilePathsContaining: [
"*.html"
]
Put that block at the end of the file and make sure it's one indent in. If in doubt just format it similarly to the other pacakge configurations that are probably already in that file.
ty very much for the tip ! I actually discovered the "django-templates" package suits me better because of the way you can bind it to choosen projects, as I also need standard html templates simultaneously. You're the man !
I have tried what you are saying but does not work, all of the Django packages appear to have been abandoned which makes me have to go back to using Sublime or VSCode when it comes to Django projects because manually changing the file type each time I open an html template.
file extension needs to be html.django for this to work otherwise you will need to change the code to work properly. Under code remove the django from snippets and settings to force to work with just html extension, but some shortcuts may collide with html addons
Step 1: install
'django-templates
This is all I did, then changed the file syntax to "html (Django)" and it worked! Thank you!
If I open a django template .html file, Atom assumes that it's just a standard html file.
I feel like it didn't do this before. How do I get Atom to correctly recognize that a file is a django template as opposed to a standard html file?
EDIT: I solved this issue (by using a different package). Check out my instructions in my other comment further down the page.