Skip to content

Commit d20247f

Browse files
slivercn2ygk
andauthored
Documented how to add DJA to installed apps (#963)
This setting is now needed for browsable api and openapi schema. There might be more features coming needing this and it is also common practice to do this for django apps. Co-authored-by: Alan Crosswell <[email protected]>
1 parent 4c62f1d commit d20247f

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

README.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ Generally Python and Django series are supported till the official end of life.
100100
Installation
101101
------------
102102

103-
From PyPI
104-
^^^^^^^^^
103+
Install using ``pip``...
105104

106105
::
107106

@@ -112,8 +111,7 @@ From PyPI
112111
$ pip install djangorestframework-jsonapi['openapi']
113112

114113

115-
From Source
116-
^^^^^^^^^^^
114+
or from source...
117115

118116
::
119117

@@ -122,6 +120,18 @@ From Source
122120
$ pip install -e .
123121

124122

123+
and add ``rest_framework_json_api`` to your ``INSTALLED_APPS`` setting below ``rest_framework``.
124+
125+
::
126+
127+
INSTALLED_APPS = [
128+
...
129+
'rest_framework',
130+
'rest_framework_json_api',
131+
...
132+
]
133+
134+
125135
Running the example app
126136
^^^^^^^^^^^^^^^^^^^^^^^
127137

docs/getting-started.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,29 @@ Generally Python and Django series are supported till the official end of life.
6161

6262
## Installation
6363

64-
From PyPI
64+
Install using `pip`...
6565

6666
pip install djangorestframework-jsonapi
6767
# for optional package integrations
6868
pip install djangorestframework-jsonapi['django-filter']
6969
pip install djangorestframework-jsonapi['django-polymorphic']
7070
pip install djangorestframework-jsonapi['openapi']
7171

72-
From Source
72+
or from source...
7373

7474
git clone https://github.com/django-json-api/django-rest-framework-json-api.git
7575
cd django-rest-framework-json-api && pip install -e .
7676

77+
78+
and add `rest_framework_json_api` to your `INSTALLED_APPS` setting below `rest_framework`.
79+
80+
INSTALLED_APPS = [
81+
...
82+
'rest_framework',
83+
'rest_framework_json_api',
84+
...
85+
]
86+
7787
## Running the example app
7888

7989
git clone https://github.com/django-json-api/django-rest-framework-json-api.git

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ The `prefetch_related` case will issue 4 queries, but they will be small and fas
998998

999999
## Generating an OpenAPI Specification (OAS) 3.0 schema document
10001000

1001-
DRF >= 3.12 has a [new OAS schema functionality](https://www.django-rest-framework.org/api-guide/schemas/) to generate an
1001+
DRF has a [OAS schema functionality](https://www.django-rest-framework.org/api-guide/schemas/) to generate an
10021002
[OAS 3.0 schema](https://www.openapis.org/) as a YAML or JSON file.
10031003

10041004
DJA extends DRF's schema support to generate an OAS schema in the JSON:API format.

0 commit comments

Comments
 (0)