really spaceless (trim spaces at line start)
This tag is meant to override the current implementation of '{% spaceless %}' tag and remove spaces at the beginning of a line too. I.e. a template like this: <div> <div>useless space up front</div> </div> will become this `<div>` `<div>useless space up front</div>` `</div>` All the other behaviour of spaceless stays the same! Put this in your app/name/templatetags/tags.py And if you want it to override the default "spaceless"-tag to the following from django.template import add_to_builtins add_to_builtins('app.name.templatetags.tags')
- template
- tag
- trim
- spaceless