Skip to content

Instantly share code, notes, and snippets.

@andymboyle
Created May 9, 2011 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andymboyle/961933 to your computer and use it in GitHub Desktop.
Save andymboyle/961933 to your computer and use it in GitHub Desktop.
The index template
<p><h1>HEY! WELCOME TO FIRETRACKER</h1></p>
<p>Recent fires: {% for f in fires %}{{ f.date.date }} -- <a href="{{f.get_absolute_url}}">{{ f.location.street }}</a>{% endfor %}</p>
<p><h2>Other ways this data could be used</h2></p>
{% for f in fires %}<p>There was a fire on {{ f.date.date }} {% if f.cause %}caused by {{ f.cause.type.lower }}{% else %}with an unknown cause {% endif %} at {{ f.location.street }}, according to <a href="{{ f.source.get_absolute_url }}">{{ f.source.title.title_short }} {{ f.source.first_name }} {{ f.source.last_name }}</a> of the {{ f.source.title.employer.name }}.{% if f.monetary_damage %} The fire caused ${{ f.monetary_damage }} in damage.{% endif %}{% if f.victims %} There were injuries.{% endif %} <a href="{{ f.get_absolute_url }}">Click here for more information.</a></p>{% endfor %}</br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment