Django and ecosystem example coverage¶
This page shows which example application demonstrates each Django feature and third-party package, and what the example exercises. Each project's README explains its setup, host and port options, requests and tests. aiodrf's own features are mapped in the feature matrix, and the tested behaviour of each package is described in the ecosystem guide.
Django services¶
| Area | Project | Exercised boundary |
|---|---|---|
| ORM, routers, serializers, filtering, pagination | CRUD | SQLite CRUD, validation, relation loading, actions and pagination through ASGI |
| Admin, authentication URLs, sessions, CSRF, messages, locale | Built-ins | Standard middleware and authentication routes; admin registration, not an exhaustive admin UI test |
| Templates, humanize, sites, flatpages, redirects, sitemaps, feeds | Built-ins | Django owns rendering and content endpoints beside async API views |
| Forms, mail, signals, database defaults, generated fields, on_commit | Built-ins | Form errors, local mail, async signal dispatch and persisted computed values |
| LocMemCache, DummyCache, FileBasedCache, DatabaseCache | Built-ins | Real backend read/write contracts without a service |
| RedisCache, PyMemcacheCache, PyLibMCCache | Built-ins | Explicit service profiles; remote tests opt in and never flush a shared cache |
| Storage and uploaded files | Uploads, services | Validation and blocking storage work in a worker, request/file ownership |
| Streaming and client disconnect | Streaming | Async generator cleanup; larger cancellation/resource suites remain in tests |
| Django 6 Tasks and Django 5 backport | Django 6 tasks, Django 5 tasks | Native/backport imports and settings, enqueue/result contracts |
| PostgreSQL and native async backend | Native PostgreSQL, tenancy | Dedicated database required; ordinary PostgreSQL locking also has a separate repository test session |
The examples do not cover PostGIS, every admin widget, every database engine or a production deployment.
Authentication and authorization¶
| Packages | Project | Exercised boundary |
|---|---|---|
djangorestframework-simplejwt, django-rest-knox, drf-auth-kit |
Vendor authentication | Vendor classes and explicit missing-credential fast paths |
django-oauth-toolkit |
Security | OAuth token expiry and scope checks |
django-guardian, djangorestframework-guardian, rules |
Security | Object-filtered lists, denied object access and ownership rules |
djoser, django-allauth, dj-rest-auth |
Security | Token login, headless authentication and JWT cookies; no external identity provider |
django-cors-headers, django-simple-history, django-auditlog |
Security | Preflight, history, audit actor and masked values |
django-axes, django-idempotency-key |
Platform protection profile | Lockout and vendor replay semantics |
Serialization, models and representations¶
| Packages | Project | Exercised boundary |
|---|---|---|
drf-writable-nested, drf-flex-fields |
Data | Nested writes and explicit expansion |
django-polymorphic, django-rest-polymorphic, django-safedelete |
Data | Subclass output and soft-delete visibility |
django-money, django-phonenumber-field, django-taggit |
Data | Money, phone and tag fields through ordinary DRF declarations |
drf-extra-fields, django-pydantic-field, djangorestframework-dataclasses |
Data | Image validation, model schema fields and dataclass input/output |
django-cleanup |
Data | Storage cleanup on transaction commit |
drf-nested-routers, nested-multipart-parser |
Data | Parent-scoped writes and nested multipart input |
drf-orjson-renderer, drf-excel, djangorestframework-camel-case |
Data | Vendor JSON, spreadsheet output and key transformation |
djangorestframework-jsonapi, djangorestframework-datatables |
Data | Read-only JSON:API and DataTables protocol |
drf-tweaks, drf-restwind, drf-standardized-errors |
Data | Pagination, browsable HTML and error envelopes |
django-restql |
Data isolated extra/profile | Projection query; pyPEG2 cold-import warnings asserted explicitly |
django-filter, drf-spectacular |
CRUD, typed schemas | Filtering and OpenAPI generation, including async/typed extensions |
rest-filters |
Data | Validated query parameters, relation lookups and list/detail filtering; DRF/spectacular parity is covered in the ecosystem suite |
msgspec, pydantic |
Serializer backends, typed schemas | Strict compiler profiles, explicit native schemas and opt-in tuning |
Operations and external services¶
| Packages | Project | Exercised boundary |
|---|---|---|
granian, uvicorn |
Basics, server guide | Separate socket tests cover HTTP, DB, lifespan and SSE cleanup; server pins live in the dedicated requirements profile |
asgi-lifespan, httpx |
Lifespan, all ASGI test fixtures | Startup/shutdown ownership and HTTP requests without a network listener |
django-redis |
Built-ins | Vendor cache backend, explicit remote service test |
django-cachalot, django-zeal, django-cacheops |
Platform cache profiles | ORM caching/N+1 tooling; cacheops requires Redis |
channels, djangochannelsrestframework |
Platform | WebSocket permission and list action; separate HTTP application |
django-health-check, whitenoise, servestatic, django-typer |
Platform | Health endpoint, ASGI/WSGI static-file profiles and typed command |
django-structlog, django-log-request-id, drf-api-logger |
Platform logging profile | Request context and vendor logging signal, no remote exporter |
django-debug-toolbar, django-silk, django-prometheus |
Platform separate profiles | Diagnostics, SQL profiling and metrics; restricted/local interfaces |
wireup, apitally |
Platform explicit profiles | Constructor injection; Apitally needs credentials to send data |
django-elasticsearch-dsl, elasticsearch |
Services | Document preparation locally; native search/index commands require a dedicated Elasticsearch service |
django-opensearch-dsl, opensearch-py |
Services | Separate document registry, worker preparation and native HTTP; optional Docker overlay |
| Native Redis/Valkey contrib backends and page-cache middleware | Services | Shared lifespan pools, explicit callback policy, Django Vary/HEAD cache semantics |
django-valkey |
Services | Native async reads/writes with lifespan-owned pools |
celery, django-storages, sentry-sdk |
Services | Commit-aware jobs, storage and error-reporting lifecycle; local defaults contact no cloud service |
opentelemetry-api, opentelemetry-sdk, opentelemetry-instrumentation-django, opentelemetry-instrumentation-asgi |
Telemetry, services | Application spans and executable offline Django/ASGI instrumentation recipes |
django-tenants |
Tenancy | Real schema routing and concurrent tenant isolation on PostgreSQL |
django-mongodb-backend |
MongoDB | ObjectId fields and explicit backend transaction adapter; replica set required |
django-async-backend |
Native PostgreSQL | Opt-in native views/serializers and backend-owned connections |
django-tasks |
Django 5 tasks | Backport API, not django-background-tasks |
Notes¶
- django-restql depends on pyPEG2, which emits an import warning; the example keeps it in a separate profile.
- WhiteNoise serves files synchronously, so under Uvicorn Django buffers its responses and warns. Serve static files with Nginx or a CDN in production, and do not silence the warning.
- Instrumentation installed by third-party ORM packages belongs to those packages; aiodrf does not patch any of them.
- Services such as S3, real telemetry exporters and cloud credentials require your own environment. See deployment behaviour.