{% extends "base.html" %} {% load filter_tags %} {% load display_tags %} {% block content %} {{ block.super }}
{% if pghistory_history %}

PostgreSQL History (pghistory)

{% include "dojo/filter_snippet.html" with form=pghistory_filter.form %}
{% include "dojo/paging_snippet.html" with page=pghistory_history %}
{% for h in pghistory_history %} {% endfor %}
Timestamp Label Object User URL IP Address Data Context Object ID Changes
{{ h.pgh_created_at }} {{ h.pgh_label }} {% if h.object_url %} {{ h.object_str|default:"N/A" }} {% else %} {{ h.object_str|default:"N/A" }} {% endif %} {{ h.user|default:"N/A" }} {% if h.url and h.url != "N/A" %} {{ h.url|truncatechars:50 }} {% else %} N/A {% endif %} {{ h.remote_addr|default:"N/A" }}
View
{{ h.pgh_data|pprint|default:"N/A" }}
{% if h.pgh_context %}
View
{{ h.pgh_context|pprint|default:"N/A" }}
{% else %} None {% endif %}
{% if h.object_url and h.pgh_obj_id %} {{ h.pgh_obj_id }} {% else %} {{ h.pgh_obj_id|default:"N/A" }} {% endif %} {% if h.pgh_label == "initial_backfill" %} Initial Backfill {% elif h.pgh_diff %}
{% for field, values in h.pgh_diff.items %}
{{ field }}: {% if values.0 is None %} None {% elif values.0 == "" %} '' {% else %} {{ values.0|truncatechars:50 }} {% endif %} to {% if values.1 is None %} None {% elif values.1 == "" %} '' {% else %} {{ values.1|truncatechars:50 }} {% endif %}
{% endfor %}
{% else %} No Changes {% endif %}
{% include "dojo/paging_snippet.html" with page=pghistory_history %}
{% endif %} {% if auditlog_history %}

Audit Log History (django-auditlog)

{% include "dojo/filter_snippet.html" with form=log_entry_filter.form %}
{% include "dojo/paging_snippet.html" with page=auditlog_history %}
{% for h in auditlog_history %} {% endfor %}
Action Actor Date/Time Changes
{{ h }} {{ h.actor }} {{ h.timestamp }} {{ h.changes|action_log_entry|linebreaks}}
{% include "dojo/paging_snippet.html" with page=auditlog_history %}
{% endif %} {% if not pghistory_history and not auditlog_history %}

No update history found for this object

{% endif %}
{% endblock %} {% block postscript %} {{ block.super }} {% include "dojo/filter_js_snippet.html" %} {% endblock %}