Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature(docs): Add inventory file for intersphinx support. #9587

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/api-guide/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ If you are deploying to Apache, and using any non-session based authentication,

## BasicAuthentication

::: rest_framework.authentication.BasicAuthentication

This authentication scheme uses [HTTP Basic Authentication][basicauth], signed against a user's username and password. Basic authentication is generally only appropriate for testing.

If successfully authenticated, `BasicAuthentication` provides the following credentials.
Expand All @@ -126,6 +128,8 @@ Unauthenticated responses that are denied permission will result in an `HTTP 401

## TokenAuthentication

::: rest_framework.authentication.TokenAuthentication

---

**Note:** The token authentication provided by Django REST framework is a fairly simple implementation.
Expand Down Expand Up @@ -282,6 +286,8 @@ In case you want to regenerate the token (for example if it has been compromised

## SessionAuthentication

::: rest_framework.authentication.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.

If successfully authenticated, `SessionAuthentication` provides the following credentials.
Expand All @@ -300,6 +306,8 @@ CSRF validation in REST framework works slightly differently from standard Djang

## RemoteUserAuthentication

::: rest_framework.authentication.RemoteUserAuthentication

This authentication scheme allows you to delegate authentication to your web server, which sets the `REMOTE_USER`
environment variable.

Expand Down
26 changes: 26 additions & 0 deletions docs/api-guide/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Note that the exception handler will only be called for responses generated by r

## APIException

::: rest_framework.exceptions.APIException

**Signature:** `APIException()`

The **base class** for all exceptions raised inside an `APIView` class or `@api_view`.
Expand Down Expand Up @@ -145,6 +147,8 @@ dictionary of items:

## ParseError

::: rest_framework.exceptions.ParseError

**Signature:** `ParseError(detail=None, code=None)`

Raised if the request contains malformed data when accessing `request.data`.
Expand All @@ -153,6 +157,8 @@ By default this exception results in a response with the HTTP status code "400 B

## AuthenticationFailed

::: rest_framework.exceptions.AuthenticationFailed

**Signature:** `AuthenticationFailed(detail=None, code=None)`

Raised when an incoming request includes incorrect authentication.
Expand All @@ -161,6 +167,8 @@ By default this exception results in a response with the HTTP status code "401 U

## NotAuthenticated

::: rest_framework.exceptions.NotAuthenticated

**Signature:** `NotAuthenticated(detail=None, code=None)`

Raised when an unauthenticated request fails the permission checks.
Expand All @@ -169,6 +177,8 @@ By default this exception results in a response with the HTTP status code "401 U

## PermissionDenied

::: rest_framework.exceptions.PermissionDenied

**Signature:** `PermissionDenied(detail=None, code=None)`

Raised when an authenticated request fails the permission checks.
Expand All @@ -177,6 +187,8 @@ By default this exception results in a response with the HTTP status code "403 F

## NotFound

::: rest_framework.exceptions.NotFound

**Signature:** `NotFound(detail=None, code=None)`

Raised when a resource does not exist at the given URL. This exception is equivalent to the standard `Http404` Django exception.
Expand All @@ -185,6 +197,8 @@ By default this exception results in a response with the HTTP status code "404 N

## MethodNotAllowed

::: rest_framework.exceptions.MethodNotAllowed

**Signature:** `MethodNotAllowed(method, detail=None, code=None)`

Raised when an incoming request occurs that does not map to a handler method on the view.
Expand All @@ -193,6 +207,8 @@ By default this exception results in a response with the HTTP status code "405 M

## NotAcceptable

::: rest_framework.exceptions.NotAcceptable

**Signature:** `NotAcceptable(detail=None, code=None)`

Raised when an incoming request occurs with an `Accept` header that cannot be satisfied by any of the available renderers.
Expand All @@ -201,6 +217,8 @@ By default this exception results in a response with the HTTP status code "406 N

## UnsupportedMediaType

::: rest_framework.exceptions.UnsupportedMediaType

**Signature:** `UnsupportedMediaType(media_type, detail=None, code=None)`

Raised if there are no parsers that can handle the content type of the request data when accessing `request.data`.
Expand All @@ -209,6 +227,8 @@ By default this exception results in a response with the HTTP status code "415 U

## Throttled

::: rest_framework.exceptions.Throttled

**Signature:** `Throttled(wait=None, detail=None, code=None)`

Raised when an incoming request fails the throttling checks.
Expand All @@ -217,6 +237,8 @@ By default this exception results in a response with the HTTP status code "429 T

## ValidationError

::: rest_framework.exceptions.ValidationError

**Signature:** `ValidationError(detail=None, code=None)`

The `ValidationError` exception is slightly different from the other `APIException` classes:
Expand All @@ -243,6 +265,8 @@ API-only application.)

Use these as per [Django's Customizing error views documentation][django-custom-error-views].

::: rest_framework.exceptions.server_error

## `rest_framework.exceptions.server_error`

Returns a response with status code `500` and `application/json` content type.
Expand All @@ -251,6 +275,8 @@ Set as `handler500`:

handler500 = 'rest_framework.exceptions.server_error'

::: rest_framework.exceptions.bad_request

## `rest_framework.exceptions.bad_request`

Returns a response with status code `400` and `application/json` content type.
Expand Down
Loading
Loading