Skip to main content

Library for logging changes of each model

Project description

Model logs is a Django app for storing changes of yours objects

Quick start

  1. Add “model_log” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'model_log',
    ]
  2. Run python manage.py migrate to create the “model_logs” models.

  3. For adding or excluding the models you want to log, in the settings.py:

    MODELS_FOR_LOGGING = (
        'app.ClassName',    # logging only for this model
        'another_app'     # logging of all models in this app
    )
    
    MODELS_FOR_EXCLUDE = (
        'app.ClassName',    # excluding from logging only for this model
    )
  4. To override Django’s default view to show the history of a log, use LogModelAdmin instead of ModelAdmin:

    class ExampleAdmin(LogModelAdmin):
        pass

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-model-logs-0.1.15.tar.gz (8.3 kB view details)

Uploaded Source

File details

Details for the file django-model-logs-0.1.15.tar.gz.

File metadata

  • Download URL: django-model-logs-0.1.15.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.0

File hashes

Hashes for django-model-logs-0.1.15.tar.gz
Algorithm Hash digest
SHA256 36e5f448a8c0a12059c52c87aedb3b7cfd853e01d435d439f5c70d9ee129bc68
MD5 dae05946568979424df9ad5a17c2f704
BLAKE2b-256 0033b90248e946e4715143623a10961d7fe39cfcadb6e2ba42d0b54ec047e3d5

See more details on using hashes here.

Supported by

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