Working contacts page
parent
da23ea767e
commit
4bab4b8499
@ -1,5 +1,28 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ message }}</h1>
|
||||
<form action="/contacts" method="get">
|
||||
<label for="search">Search Term</label>
|
||||
<input id="search" type="text" name="q", value="{{ request.args.get('q') or '' }}">
|
||||
<input type="submit", value="Search">
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th>First</th>
|
||||
<th>Last</th>
|
||||
<th>Phone</th>
|
||||
<th>Email</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for contact in contacts %}
|
||||
<tr>
|
||||
<td>{{ contact.first_name }}</td>
|
||||
<td>{{ contact.last_name }}</td>
|
||||
<td>{{ contact.phone }}</td>
|
||||
<td>{{ contact.email }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue