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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,4 @@
2
2
3
3
At this point in its lifespan we consider Django REST framework to be essentially feature-complete. We may accept pull requests that track the continued development of Django versions, but would prefer not to accept new features or code formatting changes.
4
4
5
-
Apart from minor documentation changes, the [GitHub discussions page](https://github.com/encode/django-rest-framework/discussions) should generally be your starting point. Please only raise an issue or pull request if you've been recommended to do so after discussion.
6
-
7
5
The [Contributing guide in the documentation](https://www.django-rest-framework.org/community/contributing/) gives some more information on our process and code of conduct.
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,9 @@ The initial aim is to provide a single full-time position on REST framework.
28
28
[![][cryptapi-img]][cryptapi-url]
29
29
[![][fezto-img]][fezto-url]
30
30
[![][svix-img]][svix-url]
31
+
[![][zuplo-img]][zuplo-url]
31
32
32
-
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Spacinov][spacinov-url], [Retool][retool-url], [bit.io][bitio-url], [PostHog][posthog-url], [CryptAPI][cryptapi-url], [FEZTO][fezto-url], and [Svix][svix-url].
33
+
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Spacinov][spacinov-url], [Retool][retool-url], [bit.io][bitio-url], [PostHog][posthog-url], [CryptAPI][cryptapi-url], [FEZTO][fezto-url], [Svix][svix-url], and [Zuplo][zuplo-url].
33
34
34
35
---
35
36
@@ -53,8 +54,8 @@ Some reasons you might want to use REST framework:
53
54
54
55
# Requirements
55
56
56
-
* Python 3.8+
57
-
* Django 5.0, 4.2
57
+
* Python 3.9+
58
+
* Django 4.2, 5.0, 5.1, 5.2
58
59
59
60
We **highly recommend** and only officially support the latest patch release of
60
61
each Python and Django series.
@@ -196,6 +197,7 @@ Please see the [security policy][security-policy].
Copy file name to clipboardExpand all lines: docs/api-guide/authentication.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,12 @@ The kind of response that will be used depends on the authentication scheme. Al
90
90
91
91
Note that when a request may successfully authenticate, but still be denied permission to perform the request, in which case a `403 Permission Denied` response will always be used, regardless of the authentication scheme.
92
92
93
+
## Django 5.1+ `LoginRequiredMiddleware`
94
+
95
+
If you're running Django 5.1+ and use the [`LoginRequiredMiddleware`][login-required-middleware], please note that all views from DRF are opted-out of this middleware. This is because the authentication in DRF is based authentication and permissions classes, which may be determined after the middleware has been applied. Additionally, when the request is not authenticated, the middleware redirects the user to the login page, which is not suitable for API requests, where it's preferable to return a 401 status code.
96
+
97
+
REST framework offers an equivalent mechanism for DRF views via the global settings, `DEFAULT_AUTHENTICATION_CLASSES` and `DEFAULT_PERMISSION_CLASSES`. They should be changed accordingly if you need to enforce that API requests are logged in.
98
+
93
99
## Apache mod_wsgi specific configuration
94
100
95
101
Note that if deploying to [Apache using mod_wsgi][mod_wsgi_official], the authorization header is not passed through to a WSGI application by default, as it is assumed that authentication will be handled by Apache, rather than at an application level.
@@ -448,6 +454,12 @@ There are currently two forks of this project.
448
454
449
455
More information can be found in the [Documentation](https://django-rest-durin.readthedocs.io/en/latest/index.html).
450
456
457
+
## django-pyoidc
458
+
459
+
[dango-pyoidc][django_pyoidc] adds support for OpenID Connect (OIDC) authentication. This allows you to delegate user management to an Identity Provider, which can be used to implement Single-Sign-On (SSO). It provides support for most uses-cases, such as customizing how token info are mapped to user models, using OIDC audiences for access control, etc.
460
+
461
+
More information can be found in the [Documentation](https://django-pyoidc.readthedocs.io/latest/index.html).
Copy file name to clipboardExpand all lines: docs/api-guide/fields.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -291,8 +291,8 @@ Corresponds to `django.db.models.fields.DecimalField`.
291
291
*`max_digits` The maximum number of digits allowed in the number. It must be either `None` or an integer greater than or equal to `decimal_places`.
292
292
*`decimal_places` The number of decimal places to store with the number.
293
293
*`coerce_to_string` Set to `True` if string values should be returned for the representation, or `False` if `Decimal` objects should be returned. Defaults to the same value as the `COERCE_DECIMAL_TO_STRING` settings key, which will be `True` unless overridden. If `Decimal` objects are returned by the serializer, then the final output format will be determined by the renderer. Note that setting `localize` will force the value to `True`.
294
-
*`max_value` Validate that the number provided is no greater than this value.
295
-
*`min_value` Validate that the number provided is no less than this value.
294
+
*`max_value` Validate that the number provided is no greater than this value. Should be an integer or `Decimal` object.
295
+
*`min_value` Validate that the number provided is no less than this value. Should be an integer or `Decimal` object.
296
296
*`localize` Set to `True` to enable localization of input and output based on the current locale. This will also force `coerce_to_string` to `True`. Defaults to `False`. Note that data formatting is enabled if you have set `USE_L10N=True` in your settings file.
297
297
*`rounding` Sets the rounding mode used when quantizing to the configured precision. Valid values are [`decimal` module rounding modes][python-decimal-rounding-modes]. Defaults to `None`.
298
298
*`normalize_output` Will normalize the decimal value when serialized. This will strip all trailing zeroes and change the value's precision to the minimum required precision to be able to represent the value without losing data. Defaults to `False`.
@@ -552,7 +552,7 @@ For further examples on `HiddenField` see the [validators](validators.md) docume
552
552
553
553
---
554
554
555
-
**Note:**`HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request). This behavior might change in future, follow updates on [github discussion](https://github.com/encode/django-rest-framework/discussions/8259).
555
+
**Note:**`HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request).
0 commit comments