diff --git a/README.md b/README.md
index d710f3d4a..814da6e92 100644
--- a/README.md
+++ b/README.md
@@ -26,10 +26,9 @@ The initial aim is to provide a single full-time position on REST framework.
-
-*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), [Rollbar](https://rollbar.com), and [MicroPyramid](https://micropyramid.com/django-rest-framework-development-services/).*
+*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com/).*
---
diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md
index 05b8523f8..a7a24029b 100644
--- a/docs/api-guide/authentication.md
+++ b/docs/api-guide/authentication.md
@@ -222,6 +222,21 @@ It is also possible to create Tokens manually through admin interface. In case y
TokenAdmin.raw_id_fields = ('user',)
+#### Using Django manage.py command
+
+Since version 3.6.4 it's possible to generate a user token using the following command:
+
+ ./manage.py drf_create_token
+
+this command will return the API token for the given user, creating it if it doesn't exist:
+
+ Generated token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b for user user1
+
+In case you want to regenerate the token (for example if it has been compromised or leaked) you can pass an additional parameter:
+
+ ./manage.py drf_create_token -r
+
+
## SessionAuthentication
This authentication scheme uses Django's default session backend for authentication. Session authentication is appropriate for AJAX clients that are running in the same session context as your website.
@@ -239,6 +254,28 @@ If you're using an AJAX style API with SessionAuthentication, you'll need to mak
CSRF validation in REST framework works slightly differently to standard Django due to the need to support both session and non-session based authentication to the same views. This means that only authenticated requests require CSRF tokens, and anonymous requests may be sent without CSRF tokens. This behaviour is not suitable for login views, which should always have CSRF validation applied.
+
+## RemoteUserAuthentication
+
+This authentication scheme allows you to delegate authentication to your web server, which sets the `REMOTE_USER`
+environment variable.
+
+To use it, you must have `django.contrib.auth.backends.RemoteUserBackend` (or a subclass) in your
+`AUTHENTICATION_BACKENDS` setting. By default, `RemoteUserBackend` creates `User` objects for usernames that don't
+already exist. To change this and other behaviour, consult the
+[Django documentation](https://docs.djangoproject.com/en/stable/howto/auth-remote-user/).
+
+If successfully authenticated, `RemoteUserAuthentication` provides the following credentials:
+
+* `request.user` will be a Django `User` instance.
+* `request.auth` will be `None`.
+
+Consult your web server's documentation for information about configuring an authentication method, e.g.:
+
+* [Apache Authentication How-To](https://httpd.apache.org/docs/2.4/howto/auth.html)
+* [NGINX (Restricting Access)](https://www.nginx.com/resources/admin-guide/#restricting_access)
+
+
# Custom authentication
To implement a custom authentication scheme, subclass `BaseAuthentication` and override the `.authenticate(self, request)` method. The method should return a two-tuple of `(user, auth)` if authentication succeeds, or `None` otherwise.
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 28d06f25c..b93ac389b 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -641,7 +641,7 @@ The `.fail()` method is a shortcut for raising `ValidationError` that takes a me
return Color(red, green, blue)
-This style keeps you error messages more cleanly separated from your code, and should be preferred.
+This style keeps your error messages cleaner and more separated from your code, and should be preferred.
# Third party packages
diff --git a/docs/api-guide/pagination.md b/docs/api-guide/pagination.md
index 888390018..d767e45de 100644
--- a/docs/api-guide/pagination.md
+++ b/docs/api-guide/pagination.md
@@ -242,29 +242,6 @@ We'd then need to setup the custom class in our configuration:
Note that if you care about how the ordering of keys is displayed in responses in the browsable API you might choose to use an `OrderedDict` when constructing the body of paginated responses, but this is optional.
-## Header based pagination
-
-Let's modify the built-in `PageNumberPagination` style, so that instead of include the pagination links in the body of the response, we'll instead include a `Link` header, in a [similar style to the GitHub API][github-link-pagination].
-
- class LinkHeaderPagination(pagination.PageNumberPagination):
- def get_paginated_response(self, data):
- next_url = self.get_next_link()
- previous_url = self.get_previous_link()
-
- if next_url is not None and previous_url is not None:
- link = '<{next_url}>; rel="next", <{previous_url}>; rel="prev"'
- elif next_url is not None:
- link = '<{next_url}>; rel="next"'
- elif previous_url is not None:
- link = '<{previous_url}>; rel="prev"'
- else:
- link = ''
-
- link = link.format(next_url=next_url, previous_url=previous_url)
- headers = {'Link': link} if link else {}
-
- return Response(data, headers=headers)
-
## Using your custom pagination class
To have your custom pagination class be used by default, use the `DEFAULT_PAGINATION_CLASS` setting:
@@ -328,10 +305,15 @@ The [`DRF-extensions` package][drf-extensions] includes a [`PaginateByMaxMixin`
The [`drf-proxy-pagination` package][drf-proxy-pagination] includes a `ProxyPagination` class which allows to choose pagination class with a query parameter.
+## link-header-pagination
+
+The [`django-rest-framework-link-header-pagination` package][drf-link-header-pagination] includes a `LinkHeaderPagination` class which provides pagination via an HTTP `Link` header as desribed in [Github's developer documentation](github-link-pagination).
+
[cite]: https://docs.djangoproject.com/en/stable/topics/pagination/
[github-link-pagination]: https://developer.github.com/guides/traversing-with-pagination/
[link-header]: ../img/link-header-pagination.png
[drf-extensions]: http://chibisov.github.io/drf-extensions/docs/
[paginate-by-max-mixin]: http://chibisov.github.io/drf-extensions/docs/#paginatebymaxmixin
[drf-proxy-pagination]: https://github.com/tuffnatty/drf-proxy-pagination
+[drf-link-header-pagination]: https://github.com/tbeadle/django-rest-framework-link-header-pagination
[disqus-cursor-api]: http://cramer.io/2011/03/08/building-cursors-for-the-disqus-api
diff --git a/docs/api-guide/testing.md b/docs/api-guide/testing.md
index 753c77e2f..2b93080b3 100644
--- a/docs/api-guide/testing.md
+++ b/docs/api-guide/testing.md
@@ -82,7 +82,7 @@ For example, when forcibly authenticating using a token, you might do something
user = User.objects.get(username='olivia')
request = factory.get('/accounts/django-superstars/')
- force_authenticate(request, user=user, token=user.token)
+ force_authenticate(request, user=user, token=user.auth_token)
---
diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md
index c0c4f67e4..4fa36d0fc 100644
--- a/docs/api-guide/views.md
+++ b/docs/api-guide/views.md
@@ -23,6 +23,7 @@ For example:
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import authentication, permissions
+ from django.contrib.auth.models import User
class ListUsers(APIView):
"""
diff --git a/docs/index.md b/docs/index.md
index 23433a6b7..fbb5bc1bb 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -75,11 +75,10 @@ continued development by **[signing up for a paid plan][funding]**.