You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the Internet, on September 14th, 2023, with 135 commits 107 authors, we are happy to announce the release of Django REST framework 3.15.
23
+
24
+
## Django 4.2 and Python 3.11 support
25
+
26
+
The latest release now fully supports Django 4.2 and Python 3.11.
27
+
28
+
The current minimum versions of Django still is 3.0 and Python 3.6.
29
+
30
+
## Primary Support of UniqueConstraint
31
+
32
+
`ModelSerializer` generates validators for [UniqueConstraint](https://docs.djangoproject.com/en/4.0/ref/models/constraints/#uniqueconstraint) (both UniqueValidator and UniqueTogetherValidator)
33
+
34
+
## ValidationErrors improvements
35
+
36
+
The `ValidationError` has been aligned with Django's, currently supporting the same style (signature) and nesting.
37
+
38
+
## SimpleRouter non-regex matching support
39
+
40
+
By default the URLs created by `SimpleRouter` use regular expressions. This behavior can be modified by setting the `use_regex_path` argument to `False` when instantiating the router.
41
+
42
+
## ZoneInfo as the primary source of timezone data
43
+
44
+
Dependency on pytz has been removed and deprecation warnings have been added, Django will provide ZoneInfo instances as long as USE_DEPRECATED_PYTZ is not enabled. More info on the migration can be found [in this guide](https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html).
45
+
46
+
## Align `SearchFilter` behaviour to `django.contrib.admin` search
47
+
48
+
Searches now may contain _quoted phrases_ with spaces, each phrase is considered as a single search term, and it will raise a validation error if any null-character is provided in search. See the [Filtering API guide](../api-guide/filtering.md) for more information.
49
+
50
+
## Default values propagation
51
+
52
+
Model fields' default values are now propagated to serializer fields, for more information see the [Serializer fields API guide](../api-guide/fields.md#default).
53
+
54
+
## Other fixes and improvements
55
+
56
+
There are a number of fixes and minor improvements in this release, ranging from documentation, internal infrastructure (typing, testing, requirements, deprecation, etc.), security and overall behaviour.
57
+
58
+
See the [release notes](release-notes.md) page for a complete listing.
* Document support for http.HTTPMethod in the @action decorator added in Python 3.11 [[#9067](https://github.com/encode/django-rest-framework/pull/9067)]
49
+
* Add note for HiddenField behavior [[#9055](https://github.com/encode/django-rest-framework/pull/9055)]
50
+
* Add docs validation to release process [[#6967](https://github.com/encode/django-rest-framework/pull/6967)]
* Fix Links in Documentation to Django `reverse` and `reverse_lazy`[[#8986](https://github.com/encode/django-rest-framework/pull/8986)]
74
+
* Declared Django 4.2 support in README.md [[#8985](https://github.com/encode/django-rest-framework/pull/8985)]
75
+
* Remove django 2.2 from docs index [[#8982](https://github.com/encode/django-rest-framework/pull/8982)]
76
+
* Warn about Decimal type in min_value and max_value arguments of DecimalField [[#8972](https://github.com/encode/django-rest-framework/pull/8972)]
77
+
* Fix mapping for choice values [[#8968](https://github.com/encode/django-rest-framework/pull/8968)]
78
+
* Refactor read function to use context manager for file handling [[#8967](https://github.com/encode/django-rest-framework/pull/8967)]
79
+
* Fix: fallback on CursorPagination ordering if unset on the view [[#8954](https://github.com/encode/django-rest-framework/pull/8954)]
80
+
* Replaced `OrderedDict` with `dict`[[#8964](https://github.com/encode/django-rest-framework/pull/8964)]
81
+
* Refactor get_field_info method to include max_digits and decimal_places attributes in SimpleMetadata class [[#8943](https://github.com/encode/django-rest-framework/pull/8943)]
82
+
* Implement `__eq__` for validators [[#8925](https://github.com/encode/django-rest-framework/pull/8925)]
83
+
* Ensure CursorPagination respects nulls in the ordering field [[#8912](https://github.com/encode/django-rest-framework/pull/8912)]
84
+
* Use ZoneInfo as primary source of timezone data [[#8924](https://github.com/encode/django-rest-framework/pull/8924)]
85
+
* Add username search field for TokenAdmin (#8927) [[#8934](https://github.com/encode/django-rest-framework/pull/8934)]
86
+
* Handle Nested Relation in SlugRelatedField when many=False [[#8922](https://github.com/encode/django-rest-framework/pull/8922)]
* Update tox with django 4.2rc1 [[#8920](https://github.com/encode/django-rest-framework/pull/8920)]
92
+
* Bump version of jQuery to 3.6.4 & updated ref links [[#8909](https://github.com/encode/django-rest-framework/pull/8909)]
93
+
* Minor documentation improvements and fixes [[#8903](https://github.com/encode/django-rest-framework/pull/8903)]
94
+
* Support UniqueConstraint [[#7438](https://github.com/encode/django-rest-framework/pull/7438)]
95
+
* Test django 4.2b1 [[#8892](https://github.com/encode/django-rest-framework/pull/8892)]
96
+
* Docs: add missing renderer import in tutorial 6 [[#8885](https://github.com/encode/django-rest-framework/pull/8885)]
97
+
* Allow Request, Response, Field, and GenericAPIView to be subscriptable. This allows the classes to be made generic for type checking. [[#8825](https://github.com/encode/django-rest-framework/pull/8825)]
98
+
* Upgrade isort version in pre-commit [[#8882](https://github.com/encode/django-rest-framework/pull/8882)]
99
+
* Docs: fix code example [[#8880](https://github.com/encode/django-rest-framework/pull/8880)]
100
+
* Feat: Add some changes to ValidationError to support django style vadation errors [[#8863](https://github.com/encode/django-rest-framework/pull/8863)]
101
+
* Inherit from faked classes in tests to satisfy mypy [[#8859](https://github.com/encode/django-rest-framework/pull/8859)]
* Handle Django's ValidationErrors in ListField [[#6423](https://github.com/encode/django-rest-framework/pull/6423)]
120
+
* Remove a bit of inline CSS. Add CSP nonce where it might be required and is available [[#8783](https://github.com/encode/django-rest-framework/pull/8783)]
121
+
* Use autocomplete widget for user selection in Token admin [[#8534](https://github.com/encode/django-rest-framework/pull/8534)]
122
+
* Fix bug in validators documentation [[#8779](https://github.com/encode/django-rest-framework/pull/8779)]
123
+
* Make browsable API compatbile with strong CSP [[#8784](https://github.com/encode/django-rest-framework/pull/8784)]
124
+
* Avoid inline script execution for injecting CSRF token [[#7016](https://github.com/encode/django-rest-framework/pull/7016)]
125
+
* Remove Core API mentions from docs [[#8017](https://github.com/encode/django-rest-framework/pull/8017)]
126
+
* Mitigate global dependency on inflection #8017[[#8017](https://github.com/encode/django-rest-framework/pull/8017)][[#8781](https://github.com/encode/django-rest-framework/pull/8781)]
* Implemented Verbose Name Translation for TokenProxy [[#8713](https://github.com/encode/django-rest-framework/pull/8713)]
129
+
* Properly handle OverflowError in DurationField deserialization [[#8042](https://github.com/encode/django-rest-framework/pull/8042)]
130
+
* Fix OpenAPI operation name plural appropriately [[#8017](https://github.com/encode/django-rest-framework/pull/8017)]
131
+
* Represent SafeString as plain string on schema rendering [[#8429](https://github.com/encode/django-rest-framework/pull/8429)]
132
+
* Fix #8771 - Checking for authentication even if `_ignore_model_permissions = True`[[#8772](https://github.com/encode/django-rest-framework/pull/8772)]
* Avoid importing `django.test` package when not testing [[#8699](https://github.com/encode/django-rest-framework/pull/8699)]
158
+
* Docs: use `asterisk` for unordered list [[#8697](https://github.com/encode/django-rest-framework/pull/8697)]
159
+
* Docs: Convert all tabs into spaces [[#8692](https://github.com/encode/django-rest-framework/pull/8692)]
160
+
* Preserve exception messages for wrapped Django exceptions [[#8051](https://github.com/encode/django-rest-framework/pull/8051)]
161
+
* Added examples to schema of CursorPagination [[#8687] (https://github.com/encode/django-rest-framework/pull/8687)][[#8686](https://github.com/encode/django-rest-framework/pull/8686)]
162
+
* Fix infinite recursion with deepcopy on Request [[#8684](https://github.com/encode/django-rest-framework/pull/8684)]
163
+
* Refactor: Replace try/except with contextlib.suppress() [[#8676](https://github.com/encode/django-rest-framework/pull/8676)]
0 commit comments