Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. {% extends "index.html" %}
  2. {% block content %}
  3. <div class= "main_form">
  4. <h1>Sign-Up Form</h1>
  5. {% if form %}
  6. {{ form }}
  7. {% endif %}
  8.  
  9. <form action="/" method="POST"> <!-- Set this to post to itself. -->
  10. <label for="username">Username:</label>
  11.  
  12. <p class='error'>{{ error.username_length_error or ''}}</p> <!-- Using or '' we don't need to check for error with if/else, making more readable code -->
  13.  
  14. <input id="username" type="text" name="username" value="{{ request.form.username or '' }}"/><br>
  15. <label for="password">Password:</label>
  16.  
  17. <p class="error">{{ error.password_length_error }}</p>
  18.  
  19. <input type= "password" name= "password" value="{{ request.form.password or '' }}"/><br>
  20.  
  21. <label for= "password">Verify Password:</label>
  22.  
  23. <p class='error'>{{ error.password_match_error or ''}}</p>
  24.  
  25. <input type="password" name= "verify_password" value="{{ request.form.verify_password or '' }}"/><br>
  26. <label for= "email" >E-Mail:</label>
  27. <p class='error'>{{ error.email_error or '' }}</p>
  28. <input type="text" name="email" value="{{ request.form.email or '' }}"/><br>
  29. <input id="sub_button" type="submit"/>
  30. </form>
  31.  
  32.  
  33.  
  34. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement