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: docs/topics/3.1-announcement.md
+28-5Lines changed: 28 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,17 @@
2
2
3
3
The 3.1 release is an intermediate step in the Kickstarter project releases, and includes a range of new functionality.
4
4
5
+
Some highlights include:
6
+
7
+
* A super-smart cursor pagination scheme.
8
+
* An improved pagination API, supporting header or in-body pagination styles.
9
+
* Pagination controls rendering in the browsable API.
10
+
* Better support for API versioning.
11
+
* Built-in internalization support.
12
+
* Support for Django 1.8's `HStoreField` and `ArrayField`.
13
+
14
+
---
15
+
5
16
## Pagination
6
17
7
18
The pagination API has been improved, making it both easier to use, and more powerful.
@@ -14,20 +25,22 @@ The cursor based pagination scheme is particularly smart, and is a better approa
14
25
15
26
#### Pagination controls in the browsable API.
16
27
17
-
Paginated results now include controls that render directly in the browsable API. If you're using the page or limit/offset style, then you'll see a page based control displayed in the browsable API.
28
+
Paginated results now include controls that render directly in the browsable API. If you're using the page or limit/offset style, then you'll see a page based control displayed in the browsable API:
18
29
19
-
**IMAGE**
30
+

20
31
21
-
The cursor based pagination renders a more simple 'Previous'/'Next' control.
32
+
The cursor based pagination renders a more simple style of control:
22
33
23
-
**IMAGE**
34
+

24
35
25
36
#### Support for header-based pagination.
26
37
27
38
The pagination API was previously only able to alter the pagination style in the body of the response. The API now supports being able to write pagination information in response headers, making it possible to use pagination schemes that use the `Link` or `Content-Range` headers.
28
39
29
40
For more information, see the [custom pagination styles](../api-guide/pagination/#custom-pagination-styles) documentation.
30
41
42
+
---
43
+
31
44
## Versioning
32
45
33
46
We've made it easier to build versioned APIs. Built-in schemes for versioning include both URL based and Accept header based variations.
@@ -54,6 +67,8 @@ The output representation would match the version used on the incoming request.
54
67
]
55
68
}
56
69
70
+
---
71
+
57
72
## Internationalization
58
73
59
74
REST framework now includes a built-in set of translations, and supports internationalized error responses. This allows you to either change the default language, or to allow clients to specify the language via the `Accept-Language` header.
@@ -103,6 +118,8 @@ For more details, see the [internationalization documentation](internationalizat
103
118
104
119
Many thanks to [Craig Blaszczyk](https://github.com/jakul) for helping push this through.
105
120
121
+
---
122
+
106
123
## New field types
107
124
108
125
Django 1.8's new `ArrayField`, `HStoreField` and `UUIDField` are now all fully supported.
@@ -113,12 +130,16 @@ If you're building a new 1.8 project, then you should probably consider using `U
The serializer redesign in 3.0 did not include any public API for modifying how ModelSerializer classes automatically generate a set of fields from a given mode class. We've now re-introduced an API for this, allowing you to create new ModelSerializer base classes that behave differently, such as using a different default style for relationships.
119
138
120
139
For more information, see the documentation on [customizing field mappings](../api-guide/serializers/#customizing-field-mappings) for ModelSerializer classes.
121
140
141
+
---
142
+
122
143
## Moving packages out of core
123
144
124
145
We've now moved a number of packages out of the core of REST framework, and into separately installable packages. If you're currently using these you don't need to worry, you simply need to `pip install` the new packages, and change any import paths.
@@ -150,7 +171,9 @@ And modify your settings, like so:
150
171
151
172
Thanks go to the latest member of our maintenance team, [José Padilla](https://github.com/jpadilla/), for handling this work and taking on ownership of these packages.
152
173
153
-
# What's next?
174
+
---
175
+
176
+
## What's next?
154
177
155
178
The next focus will be on HTML renderings of API output and will include:
0 commit comments