SHARE
TWEET

Untitled

a guest Feb 12th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class UserLoginForm(forms.Form):
  2.     username = forms.CharField(required = True)
  3.     password = forms.PasswordInput(render_value = True)
  4.    
  5. {% if form.errors %}
  6. <p>Your username and password didn't match. Please try again.</p>
  7. {% endif %}
  8.  
  9. <form method="post" action="/portal/login">
  10. {% csrf_token %}
  11. <table>
  12. <tr>
  13. <td>{{ form.username.label_tag }}</td>
  14. <td>{{ form.username }}</td>
  15. </tr>
  16. <tr>
  17. <td>{{ form.password.label_tag }}</td>
  18. <td>{{ form.password }}</td>
  19. </tr>
  20. </table>
  21.  
  22. <input type="submit" value="login" />
  23. <input type="hidden" name="next" value="{{ next }}" />
  24. </form>
  25.    
  26. password = forms.PasswordInput(render_value = True)
  27.    
  28. password = forms.CharField(widget=forms.PasswordInput(render_value = True))
  29.    
  30. class UserLoginForm(forms.Form):
  31.    username = forms.CharField(required = True)
  32.    password = forms.CharField(widget=forms.PasswordInput)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top