Repository navigation
Releases
Releases · lvandergrient/django-headless
v1.2.1
- 🐛 Fix the object permissions of singletons:
PUTandPATCHon a singleton route now checkhas_object_permission, likeGETdoes. - 🐛 Fix the API root view: it now uses the authentication and permission classes of the generated routes instead of the
REST_FRAMEWORKdefaults, so it no longer lists the exposed models to anonymous requests. - 🐛 Fix reverse relations of hidden fields: a relation left out with
fieldsorexcludeon the model that defines it can no longer be filtered on or expanded from the related model. - 🐛 Fix
excludefor model properties:@expose(exclude=["my_property"])now leaves the property out of the API instead of raisingImproperlyConfigured. - 🎁 Add the system check
headless.W011, for a search field that the API does not serialize: a field left out withfieldsorexclude, or a field of a model that is not exposed. The values of such a field can be found out through?search=. - 🎁 Add the system check
headless.E004, for a search field that cannot be searched, such ascategory(a relation) orcategory__nmae. Such a field answered500on every?search=. - 🐛 Fix the error of a filter across a relation: a name the related model does not have now answers the same message as a hidden field.
- 🐛 Fix several exclusions in one request:
?~title=A&~views=2now excludes the objects that match either one, instead of only those that match both. - 🐛 Fix
LookupFilteron your own views: it now filters generic views such asListAPIView, and viewsets that defineget_queryset()without aquerysetattribute. - 🐛 Fix a
500for integers of more than 64 bits in theinandrangelookups, and for filters onDurationFieldandBinaryField. Durations are now parsed; invalid values and binary fields answer400 Bad Request. - 🐛 Fix the error message of an invalid boolean filter when
FILTER_TRUE_VALUES,FILTER_FALSE_VALUESorFILTER_NULL_VALUESis a tuple. - 🐛 Fix the routes of two exposed models with the same name in different apps, such as
blog.Articleandnews.Article. They raisedImproperlyConfiguredwhen the project started. - 🐛 Fix the routes of a model without an
objectsmanager: the generated routes now use the default manager of the model. - 🐛
@expose()now raisesImproperlyConfiguredon an abstract model, instead of failing when the routes are built. - 🐛 Fix
HEADLESS["PAGE_SIZE"]withLimitOffsetPagination: it now sets the default limit, where the list was not paginated without?limit=. - 🐛 Fix
CursorPaginationon the generated routes: without acreatedfield on the model, the list is ordered by primary key instead of answering500. - 🐛 Fix a query per object for a wildcard below the first level, such as
?expand=author.*. - 🐛 Fix the boot log for
python manage.py --settings=... runserver,python -m waitressandmod_wsgi-express. - 🐛 Fix
?fields=and?omit=for the model properties of an expanded object, such as?expand=author&omit=author.full_name. The property was serialized anyway. - 🐛 Fix lookup routes for a value with a
/:by_slug/docs%2Fintronow retrieves the object. - 🐛 Fix the type of the primary key in the OpenAPI schema and the generated types when the primary key field is not named
id. - 🐛 Client: fix the generated filter types of a
DateField. They accepted aDate, which the API answers with400 Bad Request; they now take a string such as"2026-01-15". - 🐛 Client: fix the generated types of two models named like
ArticleandArticleInputin one app, whose input and object types were merged. - 🐛 Client: leave an empty
expand,fieldsoromitlist out of the request.fields: []answered objects without fields. - 🐛 Client: fix
FormDatauploads when the client options set aContent-Typeheader, and sendBlob,ArrayBufferandURLSearchParamsbodies ofrequest()as they are. - 🐛 Client: limit the typed
expandpaths to three relations, as documented, instead of four. - 🐛 Client:
headless generatenow prints the reason of a failed request, such asECONNREFUSED.
v1.2.0
- 🎁 Add an agent skill for AI coding agents, in
skills/django-headless/SKILL.md. Install it in Claude Code with/plugin install django-headless --marketplace dwarsbit/django-headless, or for other agents withnpx skills add dwarsbit/django-headless. - 🎁 Publish the documentation as Markdown for AI agents:
https://djangoheadless.org/llms.txt,https://djangoheadless.org/llms-full.txtand/docs/<page>.mdper page.
v1.1.1
- 🐛 Fix the prefetch of many-to-many fields and reverse relations that
?fields=or?omit=leave out of the response. Expanded relations left out of the response are no longer loaded either.
v1.1.0
The stable release of v1.1.0-rc.1, with no changes since.
v1.1.0-rc.1
- 🎁 Add an OpenAPI schema of the generated routes. Enable it with
HEADLESS["SCHEMA"]for a schema route at<prefix>/schema(JSON, or YAML with?format=openapi), or generate a file withpython manage.py generateschema --generator_class headless.rest.schema.SchemaGenerator. It describes the models, pagination envelope, filters,expand,fieldsandomitparameters, lookup routes and authentication. Install its packages withpip install "django-headless[schema]". - ⚙️ Add the
SCHEMA,SCHEMA_TITLE,SCHEMA_DESCRIPTIONandSCHEMA_VERSIONsettings. - 🎁 Add the system check
headless.E003, for an enabled schema without its packages. - 🎁 Add the
@django-headless/clientnpm package, a TypeScript client for the API.DjangoRestClientrequests the routes of models and singletons, with filters, exclusions, search, ordering, pagination,expand,fieldsandomit.npx headless generategenerates the types of the exposed models from the OpenAPI schema, including the types of expanded relations. - 🎁 Add the
x-filterandx-expandableextensions to the OpenAPI schema, and type the primary key of detail routes after the primary key field. - 🎁 Type model properties in the OpenAPI schema after their return annotation, instead of as strings.
- 🐛 Fix the write operations in the OpenAPI schema for a request with the read-only secret key.
- 🐛 Fix a query per object for many-to-many fields on list routes. Many-to-many fields are now prefetched with or without
?expand=, including in expanded objects. - 🎁 Load expanded foreign keys and one-to-one relations together with the object instead of with a second query.
v1.0.0
v1.0.0-rc.9
Full Changelog: v1.0.0-rc.8...v1.0.0-rc.9
v1.0.0-rc.8
Full Changelog: v1.0.0-rc.7...v1.0.0-rc.8
v1.0.0-rc.7
Full Changelog: v1.0.0-rc.6...v1.0.0-rc.7
v1.0.0-rc.6
Full Changelog: v1.0.0-rc.5...v1.0.0-rc.6