Good morning,
The problem I have is that I want to concatenate an int with a string in a Django template, but when I try it, I return an empty value. This is my code:
{% with "object_"|add:obj.id as check_id %}
El objeto es {{check_id}}
{% endwith %}
Apparently this code does not work because obj.id is an integer and "object_" is a string. I would like to know what is the correct way to add an integer to a string within the template.
I clarify that obj , is an object that happened from the view and when I show only that value, if I get the id in the following way:
{{obj.id}}
Thanks in advance.