Skip to content

Commit 358db1a

Browse files
Fix(docs): Add links for popular objects to inventory.
1 parent 1b7dd8d commit 358db1a

21 files changed

+328
-2
lines changed

docs/api-guide/authentication.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ If you are deploying to Apache, and using any non-session based authentication,
111111

112112
## BasicAuthentication
113113

114+
::: rest_framework.authentication.BasicAuthentication
115+
114116
This authentication scheme uses [HTTP Basic Authentication][basicauth], signed against a user's username and password. Basic authentication is generally only appropriate for testing.
115117

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

127129
## TokenAuthentication
128130

131+
::: rest_framework.authentication.TokenAuthentication
132+
129133
---
130134

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

283287
## SessionAuthentication
284288

289+
::: rest_framework.authentication.SessionAuthentication
290+
285291
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.
286292

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

301307
## RemoteUserAuthentication
302308

309+
::: rest_framework.authentication.RemoteUserAuthentication
310+
303311
This authentication scheme allows you to delegate authentication to your web server, which sets the `REMOTE_USER`
304312
environment variable.
305313

docs/api-guide/exceptions.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ Note that the exception handler will only be called for responses generated by r
9797

9898
## APIException
9999

100+
::: rest_framework.exceptions.APIException
101+
100102
**Signature:** `APIException()`
101103

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

146148
## ParseError
147149

150+
::: rest_framework.exceptions.ParseError
151+
148152
**Signature:** `ParseError(detail=None, code=None)`
149153

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

154158
## AuthenticationFailed
155159

160+
::: rest_framework.exceptions.AuthenticationFailed
161+
156162
**Signature:** `AuthenticationFailed(detail=None, code=None)`
157163

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

162168
## NotAuthenticated
163169

170+
::: rest_framework.exceptions.NotAuthenticated
171+
164172
**Signature:** `NotAuthenticated(detail=None, code=None)`
165173

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

170178
## PermissionDenied
171179

180+
::: rest_framework.exceptions.PermissionDenied
181+
172182
**Signature:** `PermissionDenied(detail=None, code=None)`
173183

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

178188
## NotFound
179189

190+
::: rest_framework.exceptions.NotFound
191+
180192
**Signature:** `NotFound(detail=None, code=None)`
181193

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

186198
## MethodNotAllowed
187199

200+
::: rest_framework.exceptions.MethodNotAllowed
201+
188202
**Signature:** `MethodNotAllowed(method, detail=None, code=None)`
189203

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

194208
## NotAcceptable
195209

210+
::: rest_framework.exceptions.NotAcceptable
211+
196212
**Signature:** `NotAcceptable(detail=None, code=None)`
197213

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

202218
## UnsupportedMediaType
203219

220+
::: rest_framework.exceptions.UnsupportedMediaType
221+
204222
**Signature:** `UnsupportedMediaType(media_type, detail=None, code=None)`
205223

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

210228
## Throttled
211229

230+
::: rest_framework.exceptions.Throttled
231+
212232
**Signature:** `Throttled(wait=None, detail=None, code=None)`
213233

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

218238
## ValidationError
219239

240+
::: rest_framework.exceptions.ValidationError
241+
220242
**Signature:** `ValidationError(detail=None, code=None)`
221243

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

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

268+
::: rest_framework.exceptions.server_error
269+
246270
## `rest_framework.exceptions.server_error`
247271

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

252276
handler500 = 'rest_framework.exceptions.server_error'
253277

278+
::: rest_framework.exceptions.bad_request
279+
254280
## `rest_framework.exceptions.bad_request`
255281

256282
Returns a response with status code `400` and `application/json` content type.

0 commit comments

Comments
 (0)