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?

Adam Thompson
  • 547
  • 3
  • 14

1 Answers1

3

Your configuration works for me.

You can force the engine like this:

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