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?

1 Answer 1

3

Your configuration works for me.

You can force the engine like this:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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