django-admin-logs


Namedjango-admin-logs JSON
Version 1.2.0 PyPI version JSON
download
home_page
SummaryView, delete or disable Django admin log entries.
upload_time2024-03-03 15:23:34
maintainer
docs_urlNone
authorAdam Radwon
requires_python>=3.6
licenseMIT License
keywords django admin logs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =================
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.

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:

.. code-block:: python

    DJANGO_ADMIN_LOGS_IGNORE_UNCHANGED = True


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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-admin-logs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "django,admin,logs",
    "author": "Adam Radwon",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ad/4c/8d482360951bb857c94e1e03b33634045327175168d1e8130d985f612451/django-admin-logs-1.2.0.tar.gz",
    "platform": null,
    "description": "=================\r\nDjango Admin Logs\r\n=================\r\n\r\n.. image:: https://img.shields.io/pypi/v/django-admin-logs.svg\r\n   :target: https://pypi.python.org/pypi/django-admin-logs\r\n\r\n.. image:: https://img.shields.io/codecov/c/github/radwon/django-admin-logs.svg\r\n   :target: https://codecov.io/gh/radwon/django-admin-logs\r\n\r\nLog entries are automatically created by the Django framework whenever a user\r\nadds, changes or deletes objects through the admin interface.\r\n\r\n**Django Admin Logs** is a package that allows you to either view the admin\r\nlog entries from within the admin interface, or to disable them entirely.\r\n\r\n\r\nRequirements\r\n============\r\n\r\n* Python 3.6+\r\n* Django 3.2+\r\n\r\n\r\nInstallation\r\n============\r\n\r\nInstall the package from PyPI:\r\n\r\n.. code-block:: bash\r\n\r\n    pip install django-admin-logs\r\n\r\nThen add it to your ``INSTALLED_APPS`` in the ``settings`` file:\r\n\r\n.. code-block:: python\r\n\r\n    INSTALLED_APPS = (\r\n        ...\r\n        'django_admin_logs',\r\n        ...\r\n    )\r\n\r\n\r\nConfiguration\r\n=============\r\n\r\nBy default, **Django Admin Logs** enables log entries to be viewed from within\r\nthe admin interface but does not allow them to be deleted. Either of these\r\noptions can be configured by adding the following to your ``settings`` file.\r\n\r\n.. code-block:: python\r\n\r\n    DJANGO_ADMIN_LOGS_DELETABLE = True\r\n\r\nThis allows super users, or any staff users with the delete_logentry\r\npermission, to delete log entries from within the admin interface.\r\n\r\n.. code-block:: python\r\n\r\n    DJANGO_ADMIN_LOGS_ENABLED = False\r\n\r\nThis disables admin log entries so that they are no longer created by the\r\nDjango framework or viewable from within the admin interface.\r\n\r\nBy default, Django creates log entries with the message \"No fields changed\"\r\nwhen an unchanged object is saved in the admin interface. To prevent such log\r\nentries from being created use the following setting:\r\n\r\n.. code-block:: python\r\n\r\n    DJANGO_ADMIN_LOGS_IGNORE_UNCHANGED = True\r\n\r\n\r\nDevelopment\r\n===========\r\n\r\nFrom the local project directory, activate the virtual environment and install the development requirements:\r\n\r\n.. code-block:: bash\r\n\r\n    pip install -e .[dev]\r\n\r\nTo run tests for the installed version of Python and Django using pytest:\r\n\r\n.. code-block:: bash\r\n\r\n    pytest\r\n\r\nTo run tests for all supported Python and Django versions using tox:\r\n\r\n.. code-block:: bash\r\n\r\n    tox\r\n\r\nTo run tests for specific versions e.g. Python 3.9 and Django 3.2:\r\n\r\n.. code-block:: bash\r\n\r\n    tox -e py39-django32\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "View, delete or disable Django admin log entries.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/radwon/django-admin-logs"
    },
    "split_keywords": [
        "django",
        "admin",
        "logs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b7ff62d23df22c4f0a85bafe6a42261e4939458cfba0ce0759a2f84ce14af14",
                "md5": "39bc5c4e358057253470820e695768a2",
                "sha256": "251614a2aa15d5bdd57fe90f9f263d38e6123ea77f52af07393eecdae684e05a"
            },
            "downloads": -1,
            "filename": "django_admin_logs-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39bc5c4e358057253470820e695768a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6296,
            "upload_time": "2024-03-03T15:23:32",
            "upload_time_iso_8601": "2024-03-03T15:23:32.564804Z",
            "url": "https://files.pythonhosted.org/packages/3b/7f/f62d23df22c4f0a85bafe6a42261e4939458cfba0ce0759a2f84ce14af14/django_admin_logs-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad4c8d482360951bb857c94e1e03b33634045327175168d1e8130d985f612451",
                "md5": "5057bdeebb1fc401c736fb361d463143",
                "sha256": "4bb69c6e2bfaa7bd47ecf5c13674623e2be3b39c1550f39b2500450e6b2bdc62"
            },
            "downloads": -1,
            "filename": "django-admin-logs-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5057bdeebb1fc401c736fb361d463143",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7793,
            "upload_time": "2024-03-03T15:23:34",
            "upload_time_iso_8601": "2024-03-03T15:23:34.353437Z",
            "url": "https://files.pythonhosted.org/packages/ad/4c/8d482360951bb857c94e1e03b33634045327175168d1e8130d985f612451/django-admin-logs-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-03 15:23:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "radwon",
    "github_project": "django-admin-logs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "django-admin-logs"
}
        
Elapsed time: 0.35688s