Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Django 中编写一个自定义模板标签,这样使用:
{% mytag "/sms/{{ phone.number }}/" %}
如何让 django 在将参数字符串传递给我的模板标签之前对其进行评估?
Just use this:
{% mytag "/sms/"|add:phone.number %}