5👍
✅
Just use:
<form method="POST" action="{% url 'main:add' %}whatever/">
The code inside the curly braces will be rendered by your template system, and will precede the whatever
, thus generating the following HTML:
<form method="POST" action="/main/add/whatever/">
Source:stackexchange.com