Django PowerCRUD
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
- Install
django-powercrudandneapolitan, addpowercrud,neapolitan, anddjango_htmx, then follow the Getting Started guide for base template requirements. - Continue with Setup & Core CRUD basics for the first full view configuration, then use Filtering for the dedicated filter guide.
- Read PowerCRUD Concepts for the mental model behind surfaces, field intent, actions, presentation, selection, and bulk work, then Choosing an API Style when repeated configuration starts to obscure that intent.
- Add Inline editing and Bulk editing (synchronous), then move to Async Manager and Bulk editing (async) when you need background work.
- Use Styling & Tailwind and Customisation tips to adapt templates.
- See Template Packs to select DaisyUI or Bootstrap 5, customise a selected pack, or learn the compatible-pack contract.
- Use the Advanced Guides for persistence, permission-aware affordances, saved favourites, queryset annotations, and lazy evaluation in larger applications.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_powercrud-0.9.12.tar.gz.
File metadata
- Download URL: django_powercrud-0.9.12.tar.gz
- Upload date:
- Size: 457.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98046a72a15696b28aa52213a02753eabba478fd31a2e7a704831273cf041276
|
|
| MD5 |
6fd16e91506bd3f52aef89b9fa22d235
|
|
| BLAKE2b-256 |
5c8073f8c4e6a9e5c9a1d25f52f6e55d77b591d45aa92cbe1a1515bcf4af9e58
|
File details
Details for the file django_powercrud-0.9.12-py3-none-any.whl.
File metadata
- Download URL: django_powercrud-0.9.12-py3-none-any.whl
- Upload date:
- Size: 572.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2324b28da562c3d4341a0ff958274bd3ef86bb0831058348da59a0fbc2dcbf39
|
|
| MD5 |
4e9b7f393641ec3c317ff6f7a5aa161e
|
|
| BLAKE2b-256 |
03e125d4f8faba46053b6afa78e1b35c4396d56a50f119d5ee20a2bcd31bcc47
|