I am trying to do something like the following:
{% include "default_form.html" with action="{% url 'settings' var1 var2 %}" %}
But it doesn't seem to be supported, as I get the following error:
Could not parse the remainder: '"{%' from '"{%'
Is there any way to achieve this within the template or do I need to define action
in my view?
The simplest solution would be:
{% url 'settings' var1 var2 as action_url %}
{% include "default_form.html" with action=action_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