Skip to content

Commit 59ff883

Browse files
committed
Fix hierarchy of the responses page
1 parent f96e2b7 commit 59ff883

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

docs/api-guide/responses.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Unless you want to heavily customize REST framework for some reason, you should
1919

2020
---
2121

22-
# Creating responses
22+
## Creating responses
2323

24-
## Response()
24+
### Response()
2525

2626
**Signature:** `Response(data, status=None, template_name=None, headers=None, content_type=None)`
2727

@@ -41,52 +41,52 @@ Arguments:
4141

4242
---
4343

44-
# Attributes
44+
## Attributes
4545

46-
## .data
46+
### .data
4747

4848
The unrendered, serialized data of the response.
4949

50-
## .status_code
50+
### .status_code
5151

5252
The numeric status code of the HTTP response.
5353

54-
## .content
54+
### .content
5555

5656
The rendered content of the response. The `.render()` method must have been called before `.content` can be accessed.
5757

58-
## .template_name
58+
### .template_name
5959

6060
The `template_name`, if supplied. Only required if `HTMLRenderer` or some other custom template renderer is the accepted renderer for the response.
6161

62-
## .accepted_renderer
62+
### .accepted_renderer
6363

6464
The renderer instance that will be used to render the response.
6565

6666
Set automatically by the `APIView` or `@api_view` immediately before the response is returned from the view.
6767

68-
## .accepted_media_type
68+
### .accepted_media_type
6969

7070
The media type that was selected by the content negotiation stage.
7171

7272
Set automatically by the `APIView` or `@api_view` immediately before the response is returned from the view.
7373

74-
## .renderer_context
74+
### .renderer_context
7575

7676
A dictionary of additional context information that will be passed to the renderer's `.render()` method.
7777

7878
Set automatically by the `APIView` or `@api_view` immediately before the response is returned from the view.
7979

8080
---
8181

82-
# Standard HttpResponse attributes
82+
## Standard HttpResponse attributes
8383

8484
The `Response` class extends `SimpleTemplateResponse`, and all the usual attributes and methods are also available on the response. For example you can set headers on the response in the standard way:
8585

8686
response = Response()
8787
response['Cache-Control'] = 'no-cache'
8888

89-
## .render()
89+
### .render()
9090

9191
**Signature:** `.render()`
9292

0 commit comments

Comments
 (0)