class LoginForm(forms.Form):
username = forms.CharField(label='账号', initial='用户名/邮箱')
password = forms.CharField(label='密码', widget=forms.PasswordInput)
更改login.html如下
<div class="login-form">
<form action="{% url 'login' %}" method="post">
<tr>
<th><label>账号:</label></th>
<td><input type="text" name="username" value="用户名/邮箱/手机号码" id="id_username" required></td>
</tr>
<br>
<tr>
<th><label>密码:</label></th>
<td><input type="password" name="password" id="id_password" re