2

Is there a mechanism in Mako templates that would allow me to remove extra spaces from the template output, similar to Django's {% spaceless %} tag?

tshepang
  • 12,111
  • 21
  • 91
  • 136
akonsu
  • 28,824
  • 33
  • 119
  • 194

1 Answers1

2

There are some clues here, but basically it doesn't look like it's supported under Mako directly.

I do want to point out, however that Jinja2 does support whitespace removal via the {%- and -%} opening and closing tags. It is very easy to use under Pyramid via:

pip install pyramid_jinja2

config.include('pyramid_jinja2')

From that point forward you can just use the .jinja2 file extension and build your templates.

Anyway, sorry I couldn't give you better news!

Community
  • 1
  • 1
Michael Merickel
  • 23,153
  • 3
  • 54
  • 70