File size: 803 Bytes
48ec4db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!-- All the data is accessible via context  -->
<div>
    {% if context.user.role == "guest" %}
        <p>Hello, guest!</p>
    {% else %}
        <p>Hello, {{ context.user.instance.email }}</p>
    {% endif %}

    <p>Today</p>
    <ul>
        {% for chat in context.chats.today %}
            <li>{{ chat.title }}</li>
        {% endfor %}
    </ul>
    <p>Last week</p>
    <ul>
        {% for chat in context.chats.last_week %}
            <li>{{ chat.title }}</li>
        {% endfor %}
    </ul>
    <p>Last month</p>
    <ul>
        {% for chat in context.chats.last_month %}
            <li>{{ chat.title }}</li>
        {% endfor %}
    </ul>
    <p>Later</p>
     <ul>
        {% for chat in context.chats.other %}
            <li>{{ chat.title }}</li>
        {% endfor %}
    </ul>
</div>