Understand the parameters following the redirect in djgango and the action in the form

return  redirect('/login/')

, Can be understood as jumping to a url or a page, the parameter in brackets is the path in the urls.py file, you need to add / in the front, and you can not add it in the back 

 

<form action='/login/' method="post">

action = ‘/login/’

It can be understood as sending some request data to a url or page, this is the path in urls.py

Guess you like

Origin blog.csdn.net/weixin_48154829/article/details/107761733