django-despacer is a new PyPI package that is a lightweight loader for the Django Template Language (DTL). It enables removing excess whitespace by using delimiters like {#- and -#} (similar to Jinja2, Golang, PHP’s Twig). It’s lightweight because it adds just two regular expressions that run at template loading time and nothing at request handling time.
This package is intended as a demonstration of this feature. I’m hoping this feature will eventually be included in Django’s core code, at which time this package will no longer be needed.