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: .github/ISSUE_TEMPLATE/1-issue.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,13 @@ about: Please only raise an issue if you've been advised to do so after discussi
5
5
6
6
## Checklist
7
7
8
+
<!--
9
+
Note: REST framework is considered feature-complete. New functionality should be implemented outside the core REST framework. For details, please check the docs: https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages
10
+
-->
11
+
8
12
-[ ] Raised initially as discussion #...
9
-
-[ ] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages) where possible.)
13
+
-[ ] This is not a feature request suitable for implementation outside this project. Please elaborate what it is:
14
+
-[ ] compatibility fix for new Django/Python version ...
15
+
-[ ] other type of bug fix
16
+
-[ ] other type of improvement that does not touch existing code or change existing behavior (e.g. wrapper for new Django field)
10
17
-[ ] I have reduced the issue to the simplest possible case.
Copy file name to clipboardExpand all lines: README.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,10 @@ The initial aim is to provide a single full-time position on REST framework.
27
27
[![][posthog-img]][posthog-url]
28
28
[![][cryptapi-img]][cryptapi-url]
29
29
[![][fezto-img]][fezto-url]
30
+
[![][svix-img]][svix-url]
31
+
[![][zuplo-img]][zuplo-url]
30
32
31
-
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], and [FEZTO][fezto-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].
32
34
33
35
---
34
36
@@ -38,14 +40,12 @@ Django REST framework is a powerful and flexible toolkit for building Web APIs.
38
40
39
41
Some reasons you might want to use REST framework:
40
42
41
-
* The [Web browsable API][sandbox] is a huge usability win for your developers.
43
+
* The Web browsable API is a huge usability win for your developers.
42
44
*[Authentication policies][authentication] including optional packages for [OAuth1a][oauth1-section] and [OAuth2][oauth2-section].
43
45
*[Serialization][serializers] that supports both [ORM][modelserializer-section] and [non-ORM][serializer-section] data sources.
44
46
* Customizable all the way down - just use [regular function-based views][functionview-section] if you don't need the [more][generic-views][powerful][viewsets][features][routers].
45
47
*[Extensive documentation][docs], and [great community support][group].
46
48
47
-
There is a live example API for testing purposes, [available here][sandbox].
48
-
49
49
**Below**: *Screenshot from the browsable API*
50
50
51
51
![Screenshot][image]
@@ -54,8 +54,8 @@ There is a live example API for testing purposes, [available here][sandbox].
54
54
55
55
# Requirements
56
56
57
-
* Python 3.6+
58
-
* Django 4.2, 4.1, 4.0, 3.2, 3.1, 3.0
57
+
* Python 3.8+
58
+
* Django 5.0, 4.2
59
59
60
60
We **highly recommend** and only officially support the latest patch release of
61
61
each Python and Django series.
@@ -173,8 +173,6 @@ Full documentation for the project is available at [https://www.django-rest-fram
173
173
174
174
For questions and support, use the [REST framework discussion group][group], or `#restframework` on libera.chat IRC.
175
175
176
-
You may also want to [follow the author on Twitter][twitter].
177
-
178
176
# Security
179
177
180
178
Please see the [security policy][security-policy].
@@ -185,9 +183,7 @@ Please see the [security policy][security-policy].
Copy file name to clipboardExpand all lines: docs/api-guide/fields.md
+1-9
Original file line number
Diff line number
Diff line change
@@ -68,14 +68,6 @@ When serializing the instance, default will be used if the object attribute or d
68
68
69
69
Note that setting a `default` value implies that the field is not required. Including both the `default` and `required` keyword arguments is invalid and will raise an error.
70
70
71
-
Notes regarding default value propagation from model to serializer:
72
-
73
-
All the default values from model will pass as default to the serializer and the options method.
74
-
75
-
If the default is callable then it will be propagated to & evaluated every time in the serializer but not in options method.
76
-
77
-
If the value for given field is not given then default value will be present in the serializer and available in serializer's methods. Specified validation on given field will be evaluated on default value as that field will be present in the serializer.
78
-
79
71
### `allow_null`
80
72
81
73
Normally an error will be raised if `None` is passed to a serializer field. Set this keyword argument to `True` if `None` should be considered a valid value.
@@ -303,7 +295,7 @@ Corresponds to `django.db.models.fields.DecimalField`.
303
295
*`min_value` Validate that the number provided is no less than this value.
304
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.
305
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`.
306
-
*`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 loosing data. Defaults to `False`.
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`.
Copy file name to clipboardExpand all lines: docs/api-guide/permissions.md
+1-2
Original file line number
Diff line number
Diff line change
@@ -173,12 +173,11 @@ This permission is suitable if you want to your API to allow read permissions to
173
173
174
174
This permission class ties into Django's standard `django.contrib.auth`[model permissions][contribauth]. This permission must only be applied to views that have a `.queryset` property or `get_queryset()` method. Authorization will only be granted if the user *is authenticated* and has the *relevant model permissions* assigned. The appropriate model is determined by checking `get_queryset().model` or `queryset.model`.
175
175
176
-
*`GET` requests require the user to have the `view` or `change` permission on the model
177
176
*`POST` requests require the user to have the `add` permission on the model.
178
177
*`PUT` and `PATCH` requests require the user to have the `change` permission on the model.
179
178
*`DELETE` requests require the user to have the `delete` permission on the model.
180
179
181
-
The default behaviour can also be overridden to support custom model permissions.
180
+
The default behavior can also be overridden to support custom model permissions. For example, you might want to include a `view` model permission for `GET` requests.
182
181
183
182
To use custom model permissions, override `DjangoModelPermissions` and set the `.perms_map` property. Refer to the source code for details.
0 commit comments