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.2.tar.gz (73.8 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.2-py3-none-any.whl (50.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_denorm_iplweb-1.11.2.tar.gz
Algorithm Hash digest
SHA256 bb74c1e40010b1e4ddc3e321006bb1d592cf912ce83188db36c6bd0959a95e97
MD5 3bf0e4624bda848b020e43c5830c0460
BLAKE2b-256 d9b2169628a397d242033e51269da07237309c188713ed14ec7bcafc49053cf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_denorm_iplweb-1.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a5d9b7b09458c17886b1db43e68b182bda230770f3b1980f8c352717af33312
MD5 e08600505b49fa33baa50a8357e0ad9d
BLAKE2b-256 0eac6f370adb6afd033a2b00cb7d1f30a23a23d32a7483dda86708fff5c80c75

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