@@ -24,7 +24,9 @@ Overview
24
24
* Format specification: https://jsonapi.org/format/
25
25
26
26
27
- By default, Django REST framework will produce a response like::
27
+ By default, Django REST framework will produce a response like:
28
+
29
+ .. code :: JSON
28
30
29
31
{
30
32
"count" : 20 ,
@@ -39,7 +41,9 @@ By default, Django REST framework will produce a response like::
39
41
40
42
41
43
However, for an ``identity `` model in JSON:API format the response should look
42
- like the following::
44
+ like the following:
45
+
46
+ .. code :: JSON
43
47
44
48
{
45
49
"links" : {
@@ -104,7 +108,7 @@ Installation
104
108
105
109
Install using ``pip ``...
106
110
107
- ::
111
+ .. code :: sh
108
112
109
113
$ pip install djangorestframework-jsonapi
110
114
$ # for optional package integrations
@@ -115,7 +119,7 @@ Install using ``pip``...
115
119
116
120
or from source...
117
121
118
- ::
122
+ .. code :: sh
119
123
120
124
$ git clone https://github.com/django-json-api/django-rest-framework-json-api.git
121
125
$ cd django-rest-framework-json-api
@@ -124,7 +128,7 @@ or from source...
124
128
125
129
and add ``rest_framework_json_api `` to your ``INSTALLED_APPS `` setting below ``rest_framework ``.
126
130
127
- ::
131
+ .. code :: python
128
132
129
133
INSTALLED_APPS = [
130
134
...
@@ -140,7 +144,7 @@ Running the example app
140
144
It is recommended to create a virtualenv for testing. Assuming it is already
141
145
installed and activated:
142
146
143
- ::
147
+ .. code :: sh
144
148
145
149
$ git clone https://github.com/django-json-api/django-rest-framework-json-api.git
146
150
$ cd django-rest-framework-json-api
@@ -172,7 +176,7 @@ One can either add ``rest_framework_json_api.parsers.JSONParser`` and
172
176
``rest_framework_json_api.renderers.JSONRenderer `` to each ``ViewSet `` class, or
173
177
override ``settings.REST_FRAMEWORK ``
174
178
175
- ::
179
+ .. code :: python
176
180
177
181
REST_FRAMEWORK = {
178
182
' PAGE_SIZE' : 10 ,
0 commit comments