2👍
EDIT:
Your syntax is currently impossible with the current lexer / parser system.
Why? Basically the template system has a Lexer and a Parser. The Lexer takes the template string as input, and tokenizes it. The parser then takes the list of tokens in its constructor and parses them into a list of a bunch of Nodes for the compiled template. The template tags and filters only have access to the already constructed parser — you can’t access the initial lexer string. See the comments in django/templates/__init__.py
However, there is a solution. It’s not mine (see below), but its to basically use server side includes {% ssi some_file.html %} to include an extra file that has the literal text. Yes this is an ugly solution; but without a major rewrite of the templating system it will have to suffice.
- [Django]-Django add relationships to user model
- [Django]-Pip with virtualenv not upgrading Django
- [Django]-TypeError: argument of type 'function' is not iterable when starting django runserver
- [Django]-Django-social-auth redirect after login
- [Django]-Custom metrics from celery workers into prometheus