I am using the QR code (Django) library and when I do {% qrcode_from_text "{% url 'foo' %}" "l" %}
, the inner tag gives error. Is there any way to do such nested django template tags? Thanks.
No, but you don't need to. The url
tag has a syntax to save the result to a variable:
{% url 'foo' as foo_url %}
and you can then use that in your custom tag:
{% qrcode_from_text foo_url %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With