<ul class="pager">
  {% if previous_url %}
    <li class="previous">
      <a href="{{ previous_url }}">&laquo; Previous</a>
    </li>
  {% else %}
    <li class="previous disabled">
      <a href="#">&laquo; Previous</a>
    </li>
  {% endif %}

  {% if next_url %}
    <li class="next">
      <a href="{{ next_url }}">Next &raquo;</a>
    </li>
  {% else %}
    <li class="next disabled">
      <a href="#">Next &raquo;</a>
    </li>
  {% endif %}
</ul>
