Skip to content

v1.2.1

Latest

Choose a tag to compare

@github-actions github-actions released this 11 Nov 08:06
  • 🐛 Fix the object permissions of singletons: PUT and PATCH on a singleton route now check has_object_permission, like GET does.
  • 🐛 Fix the API root view: it now uses the authentication and permission classes of the generated routes instead of the REST_FRAMEWORK defaults, so it no longer lists the exposed models to anonymous requests.
  • 🐛 Fix reverse relations of hidden fields: a relation left out with fields or exclude on the model that defines it can no longer be filtered on or expanded from the related model.
  • 🐛 Fix exclude for model properties: @expose(exclude=["my_property"]) now leaves the property out of the API instead of raising ImproperlyConfigured.
  • 🎁 Add the system check headless.W011, for a search field that the API does not serialize: a field left out with fields or exclude, 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 as category (a relation) or category__nmae. Such a field answered 500 on 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=2 now excludes the objects that match either one, instead of only those that match both.
  • 🐛 Fix LookupFilter on your own views: it now filters generic views such as ListAPIView, and viewsets that define get_queryset() without a queryset attribute.
  • 🐛 Fix a 500 for integers of more than 64 bits in the in and range lookups, and for filters on DurationField and BinaryField. Durations are now parsed; invalid values and binary fields answer 400 Bad Request.
  • 🐛 Fix the error message of an invalid boolean filter when FILTER_TRUE_VALUES, FILTER_FALSE_VALUES or FILTER_NULL_VALUES is a tuple.
  • 🐛 Fix the routes of two exposed models with the same name in different apps, such as blog.Article and news.Article. They raised ImproperlyConfigured when the project started.
  • 🐛 Fix the routes of a model without an objects manager: the generated routes now use the default manager of the model.
  • 🐛 @expose() now raises ImproperlyConfigured on an abstract model, instead of failing when the routes are built.
  • 🐛 Fix HEADLESS["PAGE_SIZE"] with LimitOffsetPagination: it now sets the default limit, where the list was not paginated without ?limit=.
  • 🐛 Fix CursorPagination on the generated routes: without a created field on the model, the list is ordered by primary key instead of answering 500.
  • 🐛 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 waitress and mod_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%2Fintro now 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 a Date, which the API answers with 400 Bad Request; they now take a string such as "2026-01-15".
  • 🐛 Client: fix the generated types of two models named like Article and ArticleInput in one app, whose input and object types were merged.
  • 🐛 Client: leave an empty expand, fields or omit list out of the request. fields: [] answered objects without fields.
  • 🐛 Client: fix FormData uploads when the client options set a Content-Type header, and send Blob, ArrayBuffer and URLSearchParams bodies of request() as they are.
  • 🐛 Client: limit the typed expand paths to three relations, as documented, instead of four.
  • 🐛 Client: headless generate now prints the reason of a failed request, such as ECONNREFUSED.