{"id":23572,"library":"django-easy-audit","title":"Django Easy Audit","description":"Yet another Django audit log app, logging login attempts, CRUD events, and requests. Version 1.3.8 is latest stable, compatible with Django 4.2–5.2 and Python 3.9–3.13. Pre-releases (1.3.9.a2) add Django 6.0 and Python 3.14 support. Regular releases about every 6 months.","status":"active","version":"1.3.8","language":"python","source_language":"en","source_url":"https://github.com/soynatan/django-easy-audit","tags":["django","audit","logging","middleware"],"install":[{"cmd":"pip install django-easy-audit","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core requirement. Compatible with Django 4.2, 5.0, 5.1, 5.2.","package":"django","optional":false}],"imports":[{"note":"Package name on PyPI is django-easy-audit but the Python package is easy_audit.","wrong":"from django_easy_audit.middleware import EasyAuditMiddleware","symbol":"EasyAuditMiddleware","correct":"from easy_audit.middleware import EasyAuditMiddleware"},{"note":"Common typo: wrong casing or spaces.","wrong":"from easy_audit.models import C R U D E v e n t","symbol":"CRUDEvent","correct":"from easy_audit.models import CRUDEvent"},{"note":"","wrong":null,"symbol":"RequestEvent","correct":"from easy_audit.models import RequestEvent"},{"note":"","wrong":null,"symbol":"LoginAttempt","correct":"from easy_audit.models import LoginAttempt"},{"note":"","wrong":null,"symbol":"logout_signal","correct":"from easy_audit.signals import logout_signal"}],"quickstart":{"code":"INSTALLED_APPS = [\n    ...\n    'easy_audit',\n]\n\nMIDDLEWARE = [\n    ...\n    'easy_audit.middleware.EasyAuditMiddleware',\n]\n\n# Then run:\n# python manage.py migrate easy_audit\n# python manage.py runserver","lang":"python","description":"Add 'easy_audit' to INSTALLED_APPS and the middleware to MIDDLEWARE. Run migrate to create tables."},"warnings":[{"fix":"Upgrade Django to 4.2 or later.","message":"In v1.3.7, support for Django 3.2 was dropped. If you upgrade from an older version and use Django 3.2, your app will break.","severity":"breaking","affected_versions":">=1.3.7"},{"fix":"Make sure your user model's id field is an integer or adjust the library's signal handlers.","message":"If you use a custom user model, you must ensure it has an id field. The library assumes user.id is integer. Assigning an anonymous user returns None for user_id.","severity":"gotcha","affected_versions":"all"},{"fix":"Rename to `DJANGO_EASY_AUDIT_CRUD_EVENT_EXCLUDED_FIELDS` in settings.","message":"The setting `DJANGO_EASY_AUDIT_CRUD_EVENT_IGNORED_FIELDS` is deprecated in favor of `DJANGO_EASY_AUDIT_CRUD_EVENT_EXCLUDED_FIELDS`. Using the old name still works but may be removed in future.","severity":"deprecated","affected_versions":">=1.3.6"},{"fix":"Upgrade to v1.3.8 or later. If still issues, wrap with `sync_to_async`.","message":"The middleware may not work with ASGI/async views out of the box. Async support was added in v1.3.8.b1 but may still have edge cases.","severity":"gotcha","affected_versions":"<1.3.8"},{"fix":"Wrap custom callbacks in try/except to avoid breaking the audit.","message":"If you set `DJANGO_EASY_AUDIT_CRUD_DIFFERENCE_CALLBACKS`, the callbacks must be importable strings (e.g., 'module.function'). If the callback raises an exception, the audit log entry may not be created.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'easy_audit' to INSTALLED_APPS (not 'django-easy-audit').","cause":"The Python package is 'easy_audit', not 'django_easy_audit'. Common mistake to use the PyPI name.","error":"django.core.exceptions.ImproperlyConfigured: Cannot import 'easy_audit'. Check that 'easy_audit' is in INSTALLED_APPS."},{"fix":"Upgrade to v1.3.6 or later. If already upgraded, ensure the middleware is after CommonMiddleware.","cause":"Your Django server is behind a reverse proxy that does not set REMOTE_ADDR. Fixed in v1.3.6+ with optional REMOTE_ADDR.","error":"KeyError: 'REMOTE_ADDR'"},{"fix":"Run 'pip install django-easy-audit' again. Check that the module name is 'easy_audit' not 'django_easy_audit'.","cause":"The package is not installed or installed under a different name. 'pip install django-easy-audit' installs the package with module name 'easy_audit'.","error":"ModuleNotFoundError: No module named 'easy_audit'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}