Skip to main content

Django CRUD Views

Tests Lint Coverage PyPI License Docs

The example app's author list: sortable filtered table, permission-aware buttons and breadcrumbs

Stop hand-writing the same list, detail, create, update and delete views for every model. Define your model, register a ViewSet, and Django CRUD Views generates the pages, wires up every URL, and cross-links the views — using your templates and your permissions, right inside your own app.

This is all you write

# app/views.py
import django_tables2 as tables

from crud_views.lib.viewset import ViewSet
from crud_views.lib.table import Table
from crud_views.lib.views import (
    ListViewTableMixin,
    ListViewPermissionRequired,
    CreateViewPermissionRequired,
    UpdateViewPermissionRequired,
    DeleteViewPermissionRequired,
)
from crud_views_object_detail.lib import ObjectDetailViewPermissionRequired
from .models import Author

cv_author = ViewSet(model=Author, name="author")


class AuthorTable(Table):
    first_name = tables.Column()
    last_name = tables.Column()


class AuthorList(ListViewTableMixin, ListViewPermissionRequired):
    cv_viewset = cv_author
    table_class = AuthorTable


class AuthorDetail(ObjectDetailViewPermissionRequired):
    cv_viewset = cv_author


class AuthorCreate(CreateViewPermissionRequired):
    cv_viewset = cv_author
    fields = ["first_name", "last_name"]


class AuthorUpdate(UpdateViewPermissionRequired):
    cv_viewset = cv_author
    fields = ["first_name", "last_name"]


class AuthorDelete(DeleteViewPermissionRequired):
    cv_viewset = cv_author

ObjectDetailViewPermissionRequired is provided by the crud_views_object_detail app; add it to INSTALLED_APPS alongside crud_views.

# app/urls.py
urlpatterns = cv_author.urlpatterns

You get list, detail, create, update and delete pages, every URL wired up, the views cross-linked, and access gated by Django's permission system.

Why developers use it

  • Skip the CRUD boilerplate — one ViewSet replaces a pile of near-identical class-based views and urls.py entries.
  • Views that know their siblings — automatic cross-linking that respects Django's permission system; no hand-written reverse() wiring.
  • Your app, your control — your templates, URLs and permissions; built on Django's generic class-based views, not locked inside /admin.
  • Batteries included — sortable, filterable, paginated tables (django-tables2, django-filter), crispy forms (django-crispy-forms), breadcrumbs, formsets, and nested parent/child URLs.
  • Grows with your app — optional extensions for workflows (django-fsm-2), polymorphic models (django-polymorphic), per-object permissions (django-guardian), ordering (django-ordered-model) and non-ORM resources.
  • Pluggable themesbootstrap5 ships as the default; bring your own theme.
  • Fails early — Django system checks validate your configuration at startup.

Install

pip install django-crud-views

Optional extras: django-crud-views[guardian] (per-object permissions), django-crud-views[ordered] (up/down ordering), django-crud-views[all] (everything).

Run the example project

The repository ships a runnable example project — the tutorial's library app plus one app per feature. All you need is Python 3.12+:

git clone https://github.com/jacob-consulting/django-crud-views.git
cd django-crud-views
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -e ".[all,examples]"
cd examples/bootstrap5
python manage.py migrate
python manage.py seed
python manage.py runserver

Browse http://127.0.0.1:8000/ and log in with alice / alice. These instructions are CI-tested on Linux, macOS and Windows.

If you use uv and task, the shortcut is task dev && task run from the repository root.

What it is not

  • a replacement for Django's admin interface
  • a complete page building system with navigations and lots of widgets

Documentation

Full tutorial and reference: https://django-crud-views.readthedocs.io

Current version

Current version: 0.19.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_crud_views-0.19.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

django_crud_views-0.19.0-py3-none-any.whl (183.9 kB view details)

Uploaded Python 3

File details

Details for the file django_crud_views-0.19.0.tar.gz.

File metadata

  • Download URL: django_crud_views-0.19.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for django_crud_views-0.19.0.tar.gz
Algorithm Hash digest
SHA256 990298d40b2a38efb057d4546a2300c3ef6dfc5fa4d0704453921025f096fd1f
MD5 07f10e2f71bba5aea62815857980d210
BLAKE2b-256 1b42526ef311ee0e7337e2f43328badbd8e5daffcc3c3fc9cfe182a1a44943bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_crud_views-0.19.0.tar.gz:

Publisher: publish.yml on jacob-consulting/django-crud-views

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_crud_views-0.19.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_crud_views-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99e8c7289cdb900c03883ad2a0e5d227b2642ba0c0029c26e2233f7b93f65acc
MD5 2cf1d45ed4b59f880676778a6cfe712a
BLAKE2b-256 6dfc08c310f34e0cb3daecac17ae7b90d1a5d97e26c30a509958f20b526b74e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_crud_views-0.19.0-py3-none-any.whl:

Publisher: publish.yml on jacob-consulting/django-crud-views

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

This release

0.19.0 This release

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.8

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.0.11

2 files

0.0.10

2 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