1👍
✅
I think you might be missing some quotation marks around your templated {{my_var}}
– change to "{{my_var}}"
.
0👍
You can pass arguments to include
like this:
{% include "emp/regfield.html" with field=form.username my_var="Must be at least 4 characters long." %}
and get rid of the with
wrapper statements. Just use include
.
- How to apply an upgrade python package whithout stop Django server?
- Efficient way in Django Models to store Items Purchased in a Transaction for a Commerce Store
- Related objects as separate endpoint (the "edge" model) using Django Rest Framework
Source:stackexchange.com