Untitled
unknown
plain_text
2 years ago
2.8 kB
2
Indexable
Never
{% extends 'base.html' %} {% include 'header.html' %} {% block title %} Home {% endblock %} {% block body %} <div class="container"> <form action='' method = "POST"> <table class="table"> <tr> <td>First Name</td> <td><input type = "text" name = "first_name" value="{{student.first_name}}" class="form-control" /></td> </tr> <tr> <td>Last Name</td> <td><input type = "text" name = "last_name" class="form-control" value="{{student.last_name}}" /></td> </tr> <tr> <td>Email</td> <td><input type = "email" name = "email" class="form-control" value="{{student.email}}" /></td> </tr> <tr> <td>Password</td> <td><input type = "password" name = "password" class="form-control" value="{{student.password}}" /></td> </tr> <tr> <td>Gender</td> <td> Male: <input type = "radio" name = "gender" value="male" {% if student.gender=='male' %} checked {% endif %} /> Female: <input type = "radio" name = "gender" value="female" {% if student.gender=='female' %} checked {% endif %} /> </td> </tr> <tr> <td>Hobbies</td> <td> Cricket : <input type="checkbox" name="hobbies" value="cricket" {% if 'cricket' in student.hobbies %} checked {% endif %} > Movies : <input type="checkbox" name="hobbies" value="movies" {% if 'movies' in student.hobbies %} checked {% endif %} > TV : <input type="checkbox" name="hobbies" value="tv" {% if 'tv' in student.hobbies %} checked {% endif %} > </td> </tr> <tr> <td>Country</td> <td> <select name="country" class="form-control"> <option value="india" {% if 'india' in student.country %} selected {% endif %} >India</option> <option value="usa" {% if 'usa' in student.country %} selected {% endif %} >USA</option> <option value="australia" {% if 'australia' in student.country %} selected {% endif %} >Australia</option> </select> </td> </tr> <tr> <td colspan="2"> <input type="submit" name="submit" value="submit" class="btn btn-warning"> </td> </tr> </table> </form> </div> {% endblock %}