[Django]-Error during template rendering (invalid block tag 'nospaceless')

2👍

No {% nospaceless %} {% endnospaceless %}.

Is {% spaceless %} {% endspaceless %}.

I only found spaceless, it works for me.

Use the spaceless tag to remove whitespace between HTML tags, not whitespace within HTML tags or whitespace in plain text

This tag is not meant to “optimize” the size of the generated HTML content but merely to avoid extra whitespace between HTML tags to avoid browser rendering quirks under some circumstances.

Reference href: spaceless

👤holdlg

1👍

Just to have it documented:

The template tag “nospaceless” came from django-tables2 they removed it in version 1.1.0

👤ness

0👍

There is no template tag called nospaceless in django. may be you wanted endspaceless ? however, the usage does not seem to be correct

Leave a comment