1π
β
{% with saving=rec.max_saving|slugify %}
{% with name=rec.category|add:β_β|add:rec.max_saving %}
{{ name }}
{% endwith %}
{% endwith %}
This issue I was facing was due to the two variables being of different datatypeβs.
Using slugify i converted the int variable to string.
Slugify worked for me because there was no spaces in my max_saving variable.
Ideally one should use stringformat:βsβ for django styled string conversion.
π€gunj_desai
0π
try thisβ¦
{% with rec.category|add:'_'|add:rec.max_saving as name %}
{{ name }}
{% endwith %}
π€Shivratna
- [Answer]-Quotes inside quotes inside quotes
- [Answer]-What can go wrong with admin url?
- [Answer]-Django update field
- [Answer]-Django form validation β compare inserted data
Source:stackexchange.com