In django / django / contrib / admin / templates / admin / login.html, the action path of the form is {{ app_path }}. What does it mean? Besides, in change_password_form, there is no action path at all. How can the form still work?
In django / django / contrib / admin / templates / admin / login.html
Share
{{ app_path }}is a template variable will be replaced with the context passed to it from the view. In this case the view is indjango/contrib/admin/sites.py:so
{{ app_path }}will be replaced with the value returned byrequest.get_full_path(), which is path where the request comes from. In this case it’s just the URL from which you loaded the form in the first place.To the second question, an action of an empty string points the form at the URL the browser currently has loaded.