What is difference between a tag and form action?
I wrote code like that.
I want if form is posted, next url got to url home:home
.
But It doesn't work. It go to default url('account/profile)
<form class="form1" method="post" action = "{% url 'login' %}?next={% url 'home:home' %}"> {% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
Then, I change my code like below. It works well
<a href="{% url 'login' %}?next={% url 'ads:all' %}">Login</a>
why form doesn't work?
below code works well.
<p class="sign" align="center">Log In</p>
<form class="form1" method="post" action = "{% url 'login' %}"> {% csrf_token %}
<input type="hidden" name="next" value="{% url 'home:home' %}" />