Add shapes module: Pydantic API surface for Django models

Imported from separate development branch. Provides Shape, Diff, and
NestedDiff classes for defining typed Pydantic schemas backed by Django
model querysets via django-readers.

Optional dependency: install with djarea[shapes] to get django-readers.
Import is guarded so the rest of djarea works without it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 01:53:20 -04:00
parent 558c7c6d6c
commit a726fd6863
4 changed files with 180 additions and 0 deletions

View File

@@ -22,6 +22,9 @@ allauth = [
webauthn = [
"fido2>=2.0",
]
shapes = [
"django-readers>=2.0",
]
dev = [
"pytest>=8.0",
"pytest-django>=4.9",