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.14

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.14
File Size Uploaded
django_powercrud-0.9.14.tar.gz 459.4 kB Details

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / django_powercrud-0.9.14.tar.gz

Download URL django_powercrud-0.9.14.tar.gz
Size 459.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f73abd0b8487d9540ee9d20f92092dab07c582c2d68f5c617711d4a83e93247e
BLAKE2b-256 checksum
How to use checksums
0d5d51fba06ea71657534e2af869562cc4c0186bdd3dcd7ef77e0d4f798f7fce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL django_powercrud-0.9.14-py3-none-any.whl
Size 572.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c1916022e362ef05ffb07d6f9b80cafc2a6a359bf2f6ea256d0b983e0e2877e
BLAKE2b-256 checksum
How to use checksums
4dfb22b521665622584060a6f4135d51ced6a4931cfe4c69f3c6e08043245920
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.9.14 This release

2 release files

0.9.13

2 release files

0.9.11

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.15

2 release files

0.7.14

2 release files

0.7.13

2 release files

0.7.12

2 release files

0.7.11

2 release files

0.7.10

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.12

2 release files

0.6.11

2 release files

0.6.10

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.47

2 release files

0.5.46

2 release files

0.5.45

2 release files

0.5.44

2 release files

0.5.43

2 release files

0.5.42

2 release files

0.5.41

2 release files

0.5.40

2 release files

0.5.39

2 release files

0.5.38

2 release files

0.5.36

2 release files

0.5.35

2 release files

0.5.34

2 release files

0.5.33

2 release files

0.5.32

2 release files

0.5.23

2 release files

0.5.22

2 release files

0.5.21

2 release files

0.5.20

2 release files

0.5.18

2 release files

0.5.17

2 release files

0.5.16

2 release files

0.5.15

2 release files

0.5.14

2 release files

0.5.13

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.6

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.4.15

2 release files

0.4.13

2 release files

0.4.12

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.3.6

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

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