{% extends "base.html" %} {% block title %}Access Logs — {{ branding.site_name }}{% endblock %} {% block content %}

Access & Security Logs

Track page visits and login attempts by IP address. Block suspicious addresses.

Backup data

Export assets and blocked IPs. Import only adds missing rows — existing barcodes and IPs are left unchanged.

Export data
{% csrf_token %}

Block an IP

{% csrf_token %}

Currently blocked

{% if blocked_ips %} {% else %}

No blocked IPs.

{% endif %}

Most active IPs

{% for row in ip_summary %} {% empty %} {% endfor %}
IPEvents
{{ row.ip_address }} {{ row.total }}
{% csrf_token %}
No activity yet.

Failed logins by IP

{% for row in failed_logins %} {% empty %} {% endfor %}
IPFailures
{{ row.ip_address }} {{ row.total }}
{% csrf_token %}
No failed logins recorded.

Recent activity (last 500)

{% for log in logs %} {% empty %} {% endfor %}
TimeIPEventPathUser
{{ log.created_at|date:"M j, Y g:i:s A" }} {{ log.ip_address }} {% if log.event_type == 'login_failed' %} {{ log.get_event_type_display }} {% elif log.event_type == 'login_success' %} {{ log.get_event_type_display }} {% elif log.event_type == 'access_blocked' %} {{ log.get_event_type_display }} {% else %} {{ log.get_event_type_display }} {% endif %} {{ log.path|default:"—" }} {{ log.username|default:"—" }}
No logs yet.
{% endblock %}