我正在尝试使用终端外观模板自定义django中的管理站点。 1.表单直接定向到管理员主页的作用是什么? 2.我的页面为终端,请按Enter提交表单,如何才能延迟到提交用户名和密码之前?
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
...
<!-- admin form -->
<form name="adminform" method="POST" action="{% url '???' %}" >
{% csrf_token %}
<!-- {{ form.as_p }} -->
<p class="search__form" >
login: <input type="text" class="input search__input" id="username" placeholder="" name="search" {{form.username}} autofocus />
</p>
</form>
<!-- my javascript checks if input starts with a '$' sign then it is the username, if it begins with a '.' it is a password, I want to combine the two and send for admin authentication -->
</body>
</html>