Skip to main content

View, delete or disable Django admin log entries.

Project description

https://img.shields.io/pypi/v/django-admin-logs.svg https://img.shields.io/codecov/c/github/radwon/django-admin-logs.svg

Log entries are automatically created by the Django framework whenever a user adds, changes or deletes objects through the admin interface.

Django Admin Logs is a package that allows you to either view the admin log entries from within the admin interface, or to disable them entirely.

Requirements

  • Python 3.8+

  • Django 4.2+

Installation

Install the package from PyPI:

pip install django-admin-logs

Then add it to your INSTALLED_APPS in the settings file:

INSTALLED_APPS = (
    ...
    'django_admin_logs',
    ...
)

Configuration

By default, Django Admin Logs enables log entries to be viewed from within the admin interface but does not allow them to be deleted. Either of these options can be configured by adding the following to your settings file.

DJANGO_ADMIN_LOGS_DELETABLE = True

This allows a superuser, or any staff user with the delete_logentry permission, to delete log entries from within the admin interface.

DJANGO_ADMIN_LOGS_ENABLED = False

This disables admin log entries so that they are no longer created by the Django framework or viewable from within the admin interface.

By default, Django creates log entries with the message “No fields changed” when an unchanged object is saved in the admin interface. To prevent such log entries from being created use the following setting:

DJANGO_ADMIN_LOGS_IGNORE_UNCHANGED = True

Development

From the local project directory, activate the virtual environment and install the development requirements:

pip install -e .[dev]

To run tests for the installed version of Python and Django using pytest:

pytest

To run tests for all supported Python and Django versions using tox:

tox

To run tests for specific versions e.g. Python 3.12 and Django 5.2:

tox -e py312-django52

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_admin_logs-1.5.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_admin_logs-1.5.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_logs-1.5.0.tar.gz.

File metadata

  • Download URL: django_admin_logs-1.5.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.8

File hashes

Hashes for django_admin_logs-1.5.0.tar.gz
Algorithm Hash digest
SHA256 ce87010b09447ed6ce39ac5d5e7d5c7d19ca3363bf2518499ceb81b9c2ef45c9
MD5 71140bc68b912a5bdde083ac2e90b4e0
BLAKE2b-256 d2cab40c038266582f6c5f68ea44e9e641e9c3400a09d0287491aefb570443ea

See more details on using hashes here.

File details

Details for the file django_admin_logs-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_logs-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b9a19ee59b60712a5005a27c0a060b5280ac2192607aa34757edfa5b3abc1c5
MD5 20a9202476f075cc8aa9fd8c14ac48fd
BLAKE2b-256 1617d27ee86afca1e6c39c77676302885106261fdabaaa1ef2876dcf22579818

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page