Skip to main content

Denormalization magic for Django

Project description

https://github.com/mpasternak/django-denorm-iplweb/actions/workflows/tests.yml/badge.svg

django-denorm-iplweb is a Django application to provide automatic management of denormalized database fields.

This is a fork of original package, that went by name of django-denorm . This fork should bring original package to the latest Django/Python versions. Also, support for pretty much anything that is not PostgreSQL was dropped.

Supported versions:

Django 4.2 LTS

Django 5.2 LTS

Django 6.0

Python 3.10

Python 3.11

Python 3.12

Python 3.13

Licensed under the BSD 3-Clause license.

Requires Celery.

Reasons for this fork being PostgreSQL-only:

  • lack of resources for maintaning other backends,

  • usage of LISTEN/NOTIFY mechanisms, available in PostgreSQL,

  • many more improvements, for example the ability to run multiple instances of cache rebuilder (see docs)

Patches welcome!

Dirty instances view

The package ships with an optional view that displays the current number of DirtyInstance rows grouped by content type — useful for monitoring the denormalization queue from a browser instead of running ./manage.py denorm_show_dirtyinstances_count over SSH.

Wire it into your project’s URLConf:

# urls.py
from django.urls import include, path

urlpatterns = [
    ...
    path("denorm/", include("denorm.urls")),
]

The view is then reachable at /denorm/dirty-instances/ and via reverse("denorm:dirty_instances_count").

Access policy is controlled by the DENORM_DIRTY_INSTANCES_VIEW_ACCESS setting (default: "staff"):

  • "staff" — only users with is_staff=True (uses staff_member_required).

  • "authenticated" — any logged-in user (uses login_required).

  • "public" — no access control. Only enable this behind your own network-level protection; the page leaks model names from your project.

Example:

# settings.py
DENORM_DIRTY_INSTANCES_VIEW_ACCESS = "authenticated"

Documentation is available from http://django-denorm-iplweb.github.io/django-denorm-iplweb/

Issues can be reported at http://github.com/mpasternak/django-denorm-iplweb/issues

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_denorm_iplweb-1.11.0.tar.gz (71.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_denorm_iplweb-1.11.0-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

Details for the file django_denorm_iplweb-1.11.0.tar.gz.

File metadata

File hashes

Hashes for django_denorm_iplweb-1.11.0.tar.gz
Algorithm Hash digest
SHA256 f52577159f566cfc2e8784a79026e3b811f242e2b001a59f4cb070b19a924da8
MD5 1c7f66ffb145e4cbbeb969b749cbc112
BLAKE2b-256 8cf2df8fe6d3809c6a47722038508b58061676f109945524589882acf4b78a63

See more details on using hashes here.

File details

Details for the file django_denorm_iplweb-1.11.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_denorm_iplweb-1.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0a944ab8783cd9876a730c43fb93152866a93e9ee9233752ec233ced54f9083
MD5 2bac97027365493c0ee2169939c7a748
BLAKE2b-256 dfff9b4c6fa711aa3e69ee542c4d72721f8562265f8a7620cd1f3962bc62b774

See more details on using hashes here.

Supported by

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