aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/img/cursor-pagination.pngbin0 -> 12221 bytes
-rw-r--r--docs/img/pages-pagination.pngbin0 -> 10229 bytes
-rw-r--r--docs/topics/3.1-announcement.md33
-rw-r--r--docs_theme/css/default.css4
4 files changed, 32 insertions, 5 deletions
diff --git a/docs/img/cursor-pagination.png b/docs/img/cursor-pagination.png
new file mode 100644
index 00000000..1c9c99b6
--- /dev/null
+++ b/docs/img/cursor-pagination.png
Binary files differ
diff --git a/docs/img/pages-pagination.png b/docs/img/pages-pagination.png
new file mode 100644
index 00000000..4ce1a09a
--- /dev/null
+++ b/docs/img/pages-pagination.png
Binary files differ
diff --git a/docs/topics/3.1-announcement.md b/docs/topics/3.1-announcement.md
index 080ef1d8..fb4fa083 100644
--- a/docs/topics/3.1-announcement.md
+++ b/docs/topics/3.1-announcement.md
@@ -2,6 +2,17 @@
The 3.1 release is an intermediate step in the Kickstarter project releases, and includes a range of new functionality.
+Some highlights include:
+
+* A super-smart cursor pagination scheme.
+* An improved pagination API, supporting header or in-body pagination styles.
+* Pagination controls rendering in the browsable API.
+* Better support for API versioning.
+* Built-in internalization support.
+* Support for Django 1.8's `HStoreField` and `ArrayField`.
+
+---
+
## Pagination
The pagination API has been improved, making it both easier to use, and more powerful.
@@ -14,13 +25,13 @@ The cursor based pagination scheme is particularly smart, and is a better approa
#### Pagination controls in the browsable API.
-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.
+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:
-**IMAGE**
+![page number based pagination](../img/pages-pagination.png )
-The cursor based pagination renders a more simple 'Previous'/'Next' control.
+The cursor based pagination renders a more simple style of control:
-**IMAGE**
+![cursor based pagination](../img/cursor-pagination.png )
#### Support for header-based pagination.
@@ -28,6 +39,8 @@ The pagination API was previously only able to alter the pagination style in the
For more information, see the [custom pagination styles](../api-guide/pagination/#custom-pagination-styles) documentation.
+---
+
## Versioning
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.
]
}
+---
+
## Internationalization
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
Many thanks to [Craig Blaszczyk](https://github.com/jakul) for helping push this through.
+---
+
## New field types
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
http://example.org/api/purchases/9b1a433f-e90d-4948-848b-300fdc26365d
+---
+
## ModelSerializer API
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.
For more information, see the documentation on [customizing field mappings](../api-guide/serializers/#customizing-field-mappings) for ModelSerializer classes.
+---
+
## Moving packages out of core
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:
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.
-# What's next?
+---
+
+## What's next?
The next focus will be on HTML renderings of API output and will include:
diff --git a/docs_theme/css/default.css b/docs_theme/css/default.css
index 3feff0ba..d998fbee 100644
--- a/docs_theme/css/default.css
+++ b/docs_theme/css/default.css
@@ -186,6 +186,10 @@ body{
margin-top: 15px
}
+#main-content img {
+ display: block;
+ margin: 40px auto;
+}
/* custom navigation styles */
.navbar .navbar-inner{