Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UserLoginForm(forms.Form):
- username = forms.CharField(required = True)
- password = forms.PasswordInput(render_value = True)
- {% if form.errors %}
- <p>Your username and password didn't match. Please try again.</p>
- {% endif %}
- <form method="post" action="/portal/login">
- {% csrf_token %}
- <table>
- <tr>
- <td>{{ form.username.label_tag }}</td>
- <td>{{ form.username }}</td>
- </tr>
- <tr>
- <td>{{ form.password.label_tag }}</td>
- <td>{{ form.password }}</td>
- </tr>
- </table>
- <input type="submit" value="login" />
- <input type="hidden" name="next" value="{{ next }}" />
- </form>
- password = forms.PasswordInput(render_value = True)
- password = forms.CharField(widget=forms.PasswordInput(render_value = True))
- class UserLoginForm(forms.Form):
- username = forms.CharField(required = True)
- password = forms.CharField(widget=forms.PasswordInput)
Add Comment
Please, Sign In to add comment