Created
January 11, 2015 21:37
-
-
Save gergob/360c832a87d4af1cfb75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "index.html" %} | |
{% block title %}Contacts{% endblock %} | |
{% block content %} | |
<h2>Contacts</h2> | |
{% if contacts %} | |
<p>There are {{ contacts | length }} contacts in the database.</p> | |
{% if contacts|length > 0 %} | |
<table role="grid"> | |
<tr> | |
<th>First Name</th> | |
<th>Last Name</th> | |
<th>Birthday</th> | |
<th>Email</th> | |
<th>Website</th> | |
<th>Work Phone</th> | |
<th>Home Phone</th> | |
<th>Mobile Phone</th> | |
<th>MongoDB ID</th> | |
</tr> | |
{% for contact in contacts %} | |
<tr> | |
<td>{{ contact['first_name'] }}</td> | |
<td>{{ contact['last_name'] }}</td> | |
<td>{{ contact['birthday'] }}</td> | |
<td>{{ contact['email'] }}</td> | |
<td>{{ contact['website'] }}</td> | |
<td>{{ contact['work_phone'] }}</td> | |
<td>{{ contact['home_phone'] }}</td> | |
<td>{{ contact['mobile_phone'] }}</td> | |
<td>{{ contact['_id'] }}</td> | |
</tr> | |
{% endfor %} | |
</table> | |
{% endif %} | |
{% else %} | |
<p>No contacts in the database.</p> | |
{% endif %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment