I'm a beginner in Django so while learning I found something.
Some people are doing a request check for example:
def register(request):
if request.method =='POST':
# Register user
redirect()
else:
return render(request,'accounts/register.html')
So I found it unnecessary because the action and method are already specified it in my HTML form.
<form action="{% url 'register' %}" method="POST">
So for me, it makes no sense, as we only making a post a request to register.
Am I wrong?