Metadata-Version: 2.1
Name: django-admin-logs
Version: 1.1.0
Summary: View, delete or disable Django admin log entries.
Author: Adam Radwon
License: Copyright (c) 2020 Adam Radwon
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/radwon/django-admin-logs
Project-URL: Changelog, https://github.com/radwon/django-admin-logs/CHANGELOG.rst
Keywords: django,admin,logs
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: Django >=3.2
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: build ; extra == 'dev'
Requires-Dist: coverage ; extra == 'dev'
Requires-Dist: Django ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: pytest-django ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'
Requires-Dist: tox ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'

=================
Django Admin Logs
=================

.. image:: https://img.shields.io/pypi/v/django-admin-logs.svg
   :target: https://pypi.python.org/pypi/django-admin-logs

.. image:: https://img.shields.io/codecov/c/github/radwon/django-admin-logs.svg
   :target: https://codecov.io/gh/radwon/django-admin-logs

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.6+
* Django 3.2+


Installation
============

Install the package from PyPI:

.. code-block:: bash

    pip install django-admin-logs

Then add it to your ``INSTALLED_APPS`` in the ``settings`` file:

.. code-block:: python

    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.

.. code-block:: python

    DJANGO_ADMIN_LOGS_DELETABLE = True

This allows super users, or any staff users with the delete_logentry
permission, to delete log entries from within the admin interface.

.. code-block:: python

    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.


Development
===========

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

.. code-block:: bash

    pip install -e .[dev]

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

.. code-block:: bash

    pytest

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

.. code-block:: bash

    tox

To run tests for specific versions e.g. Python 3.9 and Django 3.2:

.. code-block:: bash

    tox -e py39-django32
