Skip to main content

Django PowerCRUD

PyPI Run Test Matrix Security codecov License

Python Django

Advanced CRUD for perfectionists with deadlines. An opinionated Django package for shipping production-grade CRUD screens with filtering, bulk operations, inline editing, and async workflows.

PowerCRUD extends Neapolitan’s view layer with the practical infrastructure needed for real operational interfaces.

Why PowerCRUD

  • Production-ready CRUD – faster
    HTMX responses, modal forms, inline row editing, and filter sidebars are configured through class attributes rather than custom templates.

  • Bulk operations that scale
    Start synchronously with selection persistence and validation controls, then opt into async queueing with conflict locks, progress polling, and an optional dashboard when jobs run longer.

  • One async toolkit everywhere
    The async manager, conflict handling, and progress API are reusable from admin actions, management commands, or bespoke launch sites so background work behaves consistently.

  • Batteries included
    Sample app, Docker dev stack, management commands, Tailwind safelist tooling, and a maintained pytest/Playwright suite keep the project teachable and testable.

See the full documentation.

Key Features

  • HTMX-enabled CRUD views with modal create/edit/delete flows.
  • Inline row editing with dependency-aware widgets, lock checks, and permission guards.
  • Bulk edit/delete with selection persistence and an optional async path.
  • Async infrastructure: conflict locks, progress cache, django-q2 workers, cleanup command, optional dashboard persistence.
  • Filtering, sorting, and pagination helpers backed by tuned templates.
  • First-party presentation packs: built-in DaisyUI and maintained Bootstrap 5 templates, assets, and widget presentation.
  • Independent template packs: a tested public contract for authors to create and publish another framework integration.
  • Styling controls, template and pack scaffolding, and Tailwind safelist extraction.
  • Production extension points: persistence hooks, permission-aware actions, queryset annotation columns, lazy evaluation, and optional saved favourites.
  • Two supported API styles: the direct Base Configuration API plus structured declarations for reusable field and action intent.
  • Tooling support: Dockerised dev environment, management commands, pytest + Playwright coverage.

Quick Examples

Core CRUD (synchronous)

from neapolitan.views import CRUDView
from powercrud.mixins import PowerCRUDMixin


class ProjectCRUDView(PowerCRUDMixin, CRUDView):
    model = Project
    base_template_path = "core/base.html"

    # Core configuration
    fields = ["name", "owner", "status", "created_date"]
    properties = ["is_overdue"]
    filterset_fields = ["owner", "status", "created_date"]
    paginate_by = 25

    # UX helpers
    use_htmx = True
    use_modal = True
    inline_edit_fields = ["status", "owner"]

    # Bulk operations (synchronous)
    bulk_fields = ["status", "owner"]
    bulk_delete = True

This single view serves a filtered list, modal forms, inline edits, and synchronous bulk edits - no async stack required.

Structured declarations for repeated intent

The Base Configuration API above remains the most direct place to start. When the same field participates in several surfaces, the Structured Declaration API can keep that intent together and make it reusable:

from neapolitan.views import CRUDView
from powercrud.mixins import PowerCRUDMixin
from powercrud.powerfields import PowerField


PROJECT_STATUS = PowerField(
    "status",
    default_list=True,
    form=True,
    inline=True,
    bulk=True,
)


class ProjectCRUDView(PowerCRUDMixin, CRUDView):
    model = Project
    power_fields = [
        PowerField("name", default_list=True, form=True),
        PowerField("owner", default_list=True, form=True),
        PROJECT_STATUS,
    ]

Choose either Base Configuration field-intent attributes or power_fields within one view inheritance chain; do not mix them. PowerAction and PowerButton provide reusable action and toolbar declarations and may be mixed with Base API action dictionaries. See Choosing an API Style for the decision guide.

Async bulk (opt-in)

from neapolitan.views import CRUDView
from powercrud.mixins import PowerCRUDAsyncMixin


class ProjectAsyncCRUDView(PowerCRUDAsyncMixin, CRUDView):
    model = Project
    base_template_path = "core/base.html"

    bulk_fields = ["status", "owner"]
    bulk_delete = True
    bulk_async = True
    bulk_min_async_records = 20
    bulk_async_conflict_checking = True

    # Optional async dashboard manager
    async_manager_class_path = "myapp.async_manager.AppAsyncManager"

Here async queueing is explicit: you opt in by using PowerCRUDAsyncMixin, enabling bulk_async, and configuring django-q2 (django_q in INSTALLED_APPS, Q_CLUSTER, and any POWERCRUD_SETTINGS overrides you need).

Getting Started

Tooling & References

  • Sample app – complete walkthrough of every feature.
  • Docker dev environment – Django, Postgres, Redis, Vite, django-q2.
  • Management commands – template and pack scaffolding, Tailwind safelist extraction, async cleanup.
  • Testing – pytest matrix, blocking Playwright smoke tests, and a fuller local browser regression suite.

Supported Versions

PowerCRUD is tested against the following combinations:

  • Python 3.12 with Django 5.2 and 6.1
  • Python 3.13 with Django 5.2 and 6.1
  • Python 3.14 with Django 5.2 and 6.1

The CI matrix exercises each supported pairing automatically.

Development Setup

PowerCRUD’s development environment is Docker-first. From the project root:

./runproj up          # build images, start services, enter the Django container
./runtests           # run the full local suite, including Playwright and focused Bootstrap coverage

Dependencies are managed with uv; the Docker image installs them into the system interpreter so you never need to activate a virtual environment inside the container. See the Dockerised Development Environment guide for full details.

Metadata

Release files for django-powercrud 0.9.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-powercrud 0.9.15
File Size Uploaded Provenance Actions
django_powercrud-0.9.15.tar.gz 464.9 kB Without provenance Details for django_powercrud-0.9.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-powercrud 0.9.15
File Interpreter ABI Platform Actions
django_powercrud-0.9.15-py3-none-any.whl Python 3 none any Details for django_powercrud-0.9.15-py3-none-any.whl

Total release size: 1.0 MB

Release files / django_powercrud-0.9.15.tar.gz

Download URL django_powercrud-0.9.15.tar.gz
Size 464.9 kB
Tags Source
SHA-256 checksum
How to use checksums
474c780de1a4ce988027d9778c1a67d8a8e8a604625ad21e3059ca734ec8a54a
BLAKE2b-256 checksum
How to use checksums
f7d065ebb2551f5bc5186cdc49a9dcbc235099a8a92a83d86588b66953d38765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / django_powercrud-0.9.15-py3-none-any.whl

Download URL django_powercrud-0.9.15-py3-none-any.whl
Size 573.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7af365dd81734c99096ad0bb223930abd268c55084a897bff465e1b13fdb9ac
BLAKE2b-256 checksum
How to use checksums
d25ef57281177e9d061f0b0e420f7b2124712a270abd7b8e9fc18acab4c7f891
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for django-powercrud 0.9.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.15 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page