Source

django-basic-events / events / templates / events / list.html

{% extends "events/base.html" %}

{% block title %}Events{% endblock %}

{% block content %}
    {% if upcoming_events %}
        <h2>Upcoming {{ category }} Events</h2>
        {% with upcoming_events as events %}
            {% include 'events/_list_view.html' %}
        {% endwith %}
    {% endif %}
    
    {% if previous_events %}
        <h2>Past {{ category }} Events</h2>
        {% with previous_events as events %}
            {% include 'events/_list_view.html' %}
        {% endwith %}
    {% endif %}
{% endblock %}