I use the QR code library (Django), and when I do {% qrcode_from_text "{% url 'foo' %}" "l" %}, the internal tag gives an error. Is there any way to make such nested django template tags? Thank.
{% qrcode_from_text "{% url 'foo' %}" "l" %}
No, but you donβt need it. The tag urlhas syntax for storing the result in a variable:
url
{% url 'foo' as foo_url %}
and you can use it in your custom tag:
{% qrcode_from_text foo_url %}
Source: https://habr.com/ru/post/1539780/More articles:ISeries Data Source Lock - ibm-midrangeThe function always returns False. What for? - vbaSlick 2.0 Map java.util.Date in a table - scalaArray query using Go and Datastore - google-app-engineHow does awk NF filename work? - bashWrapping / Casting C struct in Cython for Python class - cSpring beans decoration provided by Grails - springHow to detect iBeacon in android without using any library - androidexpress-hbs instance registerAsyncHelper weird hash - javascriptNamespace: javax.xml.bind.UnmarshalException: unexpected element - javaAll Articles