+ | {{ r.timestamp|date:"Y-m-d H:i:s" }} |
- {% if r.action == "update" and r.changes %}
-
- {% for field, pair in r.changes.items %}
- -
- {{ field }}:
- {{ pair.0 }}
- →
- {{ pair.1 }}
-
- {% endfor %}
-
- {% elif r.action == "create" and r.changes.__created__ %}
+
+ {% if r.action == "delete" %}
+ #{{ r.entry_id }}
+ {% else %}
+ #{{ r.entry_id }}
+ {% endif %}
+ |
+
+
+ {% if r.action == "create" %}
+ Created
+ {% elif r.action == "update" %}
+ Updated
+ {% else %}
+ Deleted
+ {% endif %}
+
+ {% if r.changes %}
+
+ {# --- Created: look for the __created__ entry --- #}
+ {% if r.action == "create" %}
+ {% for k, v in r.changes.items %}
+ {% if k == "__created__" %}
Show created fields
- {% for k, v in r.changes.__created__.items %}
- - {{ k }}:
{{ v }}
- {% endfor %}
-
-
- {% elif r.action == "delete" and r.changes.__deleted__ %}
-
- Deleted record snapshot
-
- {% for k, v in r.changes.__deleted__.items %}
- - {{ k }}:
{{ v }}
+ {% for f, val in v.items %}
+ - {{ f }}:
{{ val }}
{% endfor %}
{% endif %}
- |
- {{ r.username|default:"—" }} |
-
- {% empty %}
-