=================
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.8+
* Django 4.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.10 and Django 4.2:
.. code-block:: bash
tox -e py310-django42
Raw data
{
"_id": null,
"home_page": null,
"name": "django-admin-logs",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "django, admin, logs",
"author": "Adam Radwon",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/39/2f/357d3721b3e6bccb0c8091576723abca142f987688fe74d8e932ab4ea127/django_admin_logs-1.3.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.8+\r\n* Django 4.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.10 and Django 4.2:\r\n\r\n.. code-block:: bash\r\n\r\n tox -e py310-django42\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "View, delete or disable Django admin log entries.",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/radwon/django-admin-logs"
},
"split_keywords": [
"django",
" admin",
" logs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fbee288a7c6314e23243becc1fd671ce1eaf957fe861022b12691181f98bf59b",
"md5": "9f46a422d1c047b42c08f1b77f3c7ca0",
"sha256": "e9619f185beb09397223bf973f6574db29da50c3066cc25f800f04d58af4c595"
},
"downloads": -1,
"filename": "django_admin_logs-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f46a422d1c047b42c08f1b77f3c7ca0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6550,
"upload_time": "2024-08-10T11:25:32",
"upload_time_iso_8601": "2024-08-10T11:25:32.803045Z",
"url": "https://files.pythonhosted.org/packages/fb/ee/288a7c6314e23243becc1fd671ce1eaf957fe861022b12691181f98bf59b/django_admin_logs-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "392f357d3721b3e6bccb0c8091576723abca142f987688fe74d8e932ab4ea127",
"md5": "6ec70b61e8114c1667f841617ae440f3",
"sha256": "57cd55f2dcc04592729b2778c03b86ba94cc64f5c2e286993114ca16464ff7e9"
},
"downloads": -1,
"filename": "django_admin_logs-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "6ec70b61e8114c1667f841617ae440f3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 8125,
"upload_time": "2024-08-10T11:25:34",
"upload_time_iso_8601": "2024-08-10T11:25:34.439099Z",
"url": "https://files.pythonhosted.org/packages/39/2f/357d3721b3e6bccb0c8091576723abca142f987688fe74d8e932ab4ea127/django_admin_logs-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-10 11:25: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"
}