Skip to content Skip to sidebar Skip to footer

Putting Django Passed Variables {{}} Inside {% Url %}

I am trying to do this
But it seems that django doesn't like having a {{}} variable inside {%%}, ho

Solution 1:

You don't surround the variables in a template tag with double curly brackets. The curly double brackets are used to render variables in the template, not to pass parameters in a template tag. You thus write this as:

<form action="{% url 'add_participant' id=event.id %}" method="POST">

Post a Comment for "Putting Django Passed Variables {{}} Inside {% Url %}"