3

In my django project I use basic .html files for my templates.

I want to force the django engine from web-mode.el so I don't have to constantly change between .html and .djhtml.

I've tried the following

(setq web-mode-engines-alist
      '(("django"    . "\\.html\\'"))
      )

with no luck.

Anyone had any success in this? Should I try out a different plugin?

3

Your configuration works for me.

You can force the engine like this:

(add-hook 'web-mode-hook (lambda ()
 (web-mode-set-engine "django"))
  • Also can add a condition that matches file etension .html. Because the op may want to use web-mode in other files. – stardiviner Apr 3 '16 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.