Skip to content

Commit 1edef9f

Browse files
authored
Merge branch 'master' into reserved_field_names
2 parents 7502b2d + 414547a commit 1edef9f

File tree

13 files changed

+45
-44
lines changed

13 files changed

+45
-44
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Safa AlFulaij <[email protected]>
3838
santiavenda <[email protected]>
3939
Sergey Kolomenkin <https://kolomenkin.com>
4040
41+
Swaraj Baral <[email protected]>
4142
Tim Selman <[email protected]>
4243
Tom Glowka <[email protected]>
4344
Ulrich Schuster <[email protected]>

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
Note that in line with [Django REST framework policy](http://www.django-rest-framework.org/topics/release-notes/),
8+
Note that in line with [Django REST framework policy](https://www.django-rest-framework.org/topics/release-notes/),
99
any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change.
1010

1111
## [Unreleased]
@@ -241,7 +241,7 @@ This is the last release supporting Python 2.7, Python 3.4, Django Filter 1.1, D
241241
* Add testing configuration to `REST_FRAMEWORK` configuration as described in [DRF](https://www.django-rest-framework.org/api-guide/testing/#configuration)
242242
* Add `HyperlinkedRelatedField` and `SerializerMethodHyperlinkedRelatedField`. See [usage docs](docs/usage.md#related-fields)
243243
* Add related urls support. See [usage docs](docs/usage.md#related-urls)
244-
* Add optional [jsonapi-style](http://jsonapi.org/format/) filter backends. See [usage docs](docs/usage.md#filter-backends)
244+
* Add optional [jsonapi-style](https://jsonapi.org/format/) filter backends. See [usage docs](docs/usage.md#filter-backends)
245245

246246
### Deprecated
247247

@@ -269,7 +269,7 @@ This is the last release supporting Python 2.7, Python 3.4, Django Filter 1.1, D
269269
* Add `ReadOnlyModelViewSet` extension with prefetch mixins
270270
* Add support for Django REST framework 3.8.x
271271
* Introduce `JSON_API_FORMAT_FIELD_NAMES` option replacing `JSON_API_FORMAT_KEYS` but in comparison preserving
272-
values from being formatted as attributes can contain any [json value](http://jsonapi.org/format/#document-resource-object-attributes).
272+
values from being formatted as attributes can contain any [json value](https://jsonapi.org/format/#document-resource-object-attributes).
273273
* Allow overwriting of `get_queryset()` in custom `ResourceRelatedField`
274274

275275
### Deprecated

README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Overview
2121
**JSON:API support for Django REST framework**
2222

2323
* Documentation: https://django-rest-framework-json-api.readthedocs.org/
24-
* Format specification: http://jsonapi.org/format/
24+
* Format specification: https://jsonapi.org/format/
2525

2626

2727
By default, Django REST framework will produce a response like::
2828

2929
{
3030
"count": 20,
31-
"next": "http://example.com/api/1.0/identities/?page=3",
32-
"previous": "http://example.com/api/1.0/identities/?page=1",
31+
"next": "https://example.com/api/1.0/identities/?page=3",
32+
"previous": "https://example.com/api/1.0/identities/?page=1",
3333
"results": [{
3434
"id": 3,
3535
"username": "john",
@@ -43,9 +43,9 @@ like the following::
4343

4444
{
4545
"links": {
46-
"prev": "http://example.com/api/1.0/identities",
47-
"self": "http://example.com/api/1.0/identities?page=2",
48-
"next": "http://example.com/api/1.0/identities?page=3",
46+
"prev": "https://example.com/api/1.0/identities",
47+
"self": "https://example.com/api/1.0/identities?page=2",
48+
"next": "https://example.com/api/1.0/identities?page=3",
4949
},
5050
"data": [{
5151
"type": "identities",
@@ -81,7 +81,7 @@ As a Django REST framework JSON:API (short DJA) we are trying to address followi
8181

8282
5. Be performant
8383

84-
.. _JSON:API: http://jsonapi.org
84+
.. _JSON:API: https://jsonapi.org
8585
.. _Django REST framework: https://www.django-rest-framework.org/
8686

8787
------------
@@ -202,4 +202,4 @@ override ``settings.REST_FRAMEWORK``
202202

203203
This package provides much more including automatic inflection of JSON keys, extra top level data (using nested
204204
serializers), relationships, links, paginators, filters, and handy shortcuts.
205-
Read more at http://django-rest-framework-json-api.readthedocs.org/
205+
Read more at https://django-rest-framework-json-api.readthedocs.org/

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BUILDDIR = _build
99

1010
# User-friendly check for sphinx-build
1111
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12-
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
1313
endif
1414

1515
# Internal variables.

docs/getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ By default, Django REST framework produces a response like:
99
``` js
1010
{
1111
"count": 20,
12-
"next": "http://example.com/api/1.0/identities/?page=3",
13-
"previous": "http://example.com/api/1.0/identities/?page=1",
12+
"next": "https://example.com/api/1.0/identities/?page=3",
13+
"previous": "https://example.com/api/1.0/identities/?page=1",
1414
"results": [{
1515
"id": 3,
1616
"username": "john",
@@ -25,10 +25,10 @@ like the following:
2525
``` js
2626
{
2727
"links": {
28-
"first": "http://example.com/api/1.0/identities",
29-
"last": "http://example.com/api/1.0/identities?page=5",
30-
"next": "http://example.com/api/1.0/identities?page=3",
31-
"prev": "http://example.com/api/1.0/identities",
28+
"first": "https://example.com/api/1.0/identities",
29+
"last": "https://example.com/api/1.0/identities?page=5",
30+
"next": "https://example.com/api/1.0/identities?page=3",
31+
"prev": "https://example.com/api/1.0/identities",
3232
},
3333
"data": [{
3434
"type": "identities",

docs/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if errorlevel 9009 (
6565
echo.may add the Sphinx directory to PATH.
6666
echo.
6767
echo.If you don't have Sphinx installed, grab it from
68-
echo.http://sphinx-doc.org/
68+
echo.https://sphinx-doc.org/
6969
exit /b 1
7070
)
7171

docs/usage.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The DJA package implements a custom renderer, parser, exception handler, query filter backends, and
44
pagination. To get started enable the pieces in `settings.py` that you want to use.
55

6-
Many features of the [JSON:API](http://jsonapi.org/format) format standard have been implemented using
6+
Many features of the [JSON:API](https://jsonapi.org/format) format standard have been implemented using
77
Mixin classes in `serializers.py`.
88
The easiest way to make use of those features is to import ModelSerializer variants
99
from `rest_framework_json_api` instead of the usual `rest_framework`
@@ -116,7 +116,7 @@ is used. This can help the client identify misspelled query parameters, for exam
116116

117117
If you want to change the list of valid query parameters, override the `.query_regex` attribute:
118118
```python
119-
# compiled regex that matches the allowed http://jsonapi.org/format/#query-parameters
119+
# compiled regex that matches the allowed https://jsonapi.org/format/#query-parameters
120120
# `sort` and `include` stand alone; `filter`, `fields`, and `page` have []'s
121121
query_regex = re.compile(r'^(sort|include)$|^(filter|fields|page)(\[[\w\.\-]+\])?$')
122122
```
@@ -134,7 +134,7 @@ simply don't use this filter backend.
134134

135135
#### OrderingFilter
136136

137-
`OrderingFilter` implements the [JSON:API `sort`](http://jsonapi.org/format/#fetching-sorting) and uses
137+
`OrderingFilter` implements the [JSON:API `sort`](https://jsonapi.org/format/#fetching-sorting) and uses
138138
DRF's [ordering filter](https://www.django-rest-framework.org/api-guide/filtering/#orderingfilter).
139139

140140
Per the JSON:API specification, "If the server does not support sorting as specified in the query parameter `sort`,
@@ -159,14 +159,14 @@ If you want to silently ignore bad sort fields, just use `rest_framework.filters
159159

160160
#### DjangoFilterBackend
161161

162-
`DjangoFilterBackend` implements a Django ORM-style [JSON:API `filter`](http://jsonapi.org/format/#fetching-filtering)
162+
`DjangoFilterBackend` implements a Django ORM-style [JSON:API `filter`](https://jsonapi.org/format/#fetching-filtering)
163163
using the [django-filter](https://django-filter.readthedocs.io/) package.
164164

165165
This filter is not part of the JSON:API standard per-se, other than the requirement
166166
to use the `filter` keyword: It is an optional implementation of a style of
167167
filtering in which each filter is an ORM expression as implemented by
168168
`DjangoFilterBackend` and seems to be in alignment with an interpretation of the
169-
[JSON:API _recommendations_](http://jsonapi.org/recommendations/#filtering), including relationship
169+
[JSON:API _recommendations_](https://jsonapi.org/recommendations/#filtering), including relationship
170170
chaining.
171171

172172
Filters can be:
@@ -240,7 +240,7 @@ class MyViewset(ModelViewSet):
240240
### Exception handling
241241

242242
For the `exception_handler` class, if the optional `JSON_API_UNIFORM_EXCEPTIONS` is set to True,
243-
all exceptions will respond with the JSON:API [error format](http://jsonapi.org/format/#error-objects).
243+
all exceptions will respond with the JSON:API [error format](https://jsonapi.org/format/#error-objects).
244244

245245
When `JSON_API_UNIFORM_EXCEPTIONS` is False (the default), non-JSON:API views will respond
246246
with the normal DRF error format.
@@ -312,7 +312,7 @@ multiple endpoints. Setting the `resource_name` on views may result in a differe
312312

313313
### Inflecting object and relation keys
314314

315-
This package includes the ability (off by default) to automatically convert [JSON:API field names](http://jsonapi.org/format/#document-resource-object-fields) of requests and responses from the python/rest_framework's preferred underscore to
315+
This package includes the ability (off by default) to automatically convert [JSON:API field names](https://jsonapi.org/format/#document-resource-object-fields) of requests and responses from the python/rest_framework's preferred underscore to
316316
a format of your choice. To hook this up include the following setting in your
317317
project settings:
318318

@@ -551,7 +551,7 @@ class OrderSerializer(serializers.ModelSerializer):
551551

552552
```
553553

554-
In the [JSON:API spec](http://jsonapi.org/format/#document-resource-objects),
554+
In the [JSON:API spec](https://jsonapi.org/format/#document-resource-objects),
555555
relationship objects contain links to related objects. To make this work
556556
on a serializer we need to tell the `ResourceRelatedField` about the
557557
corresponding view. Use the `HyperlinkedModelSerializer` and instantiate
@@ -755,12 +755,12 @@ class OrderSerializer(serializers.HyperlinkedModelSerializer):
755755
### RelationshipView
756756
`rest_framework_json_api.views.RelationshipView` is used to build
757757
relationship views (see the
758-
[JSON:API spec](http://jsonapi.org/format/#fetching-relationships)).
758+
[JSON:API spec](https://jsonapi.org/format/#fetching-relationships)).
759759
The `self` link on a relationship object should point to the corresponding
760760
relationship view.
761761

762762
The relationship view is fairly simple because it only serializes
763-
[Resource Identifier Objects](http://jsonapi.org/format/#document-resource-identifier-objects)
763+
[Resource Identifier Objects](https://jsonapi.org/format/#document-resource-identifier-objects)
764764
rather than full resource objects. In most cases the following is sufficient:
765765

766766
```python
@@ -896,7 +896,7 @@ Related links will be created automatically when using the Relationship View.
896896

897897
JSON:API can include additional resources in a single network request.
898898
The specification refers to this feature as
899-
[Compound Documents](http://jsonapi.org/format/#document-compound-documents).
899+
[Compound Documents](https://jsonapi.org/format/#document-compound-documents).
900900
Compound Documents can reduce the number of network requests
901901
which can lead to a better performing web application.
902902
To accomplish this,
@@ -1058,7 +1058,7 @@ class MySchemaGenerator(JSONAPISchemaGenerator):
10581058
}
10591059
}
10601060
schema['servers'] = [
1061-
{'url': 'https://localhost/v1', 'description': 'local docker'},
1061+
{'url': 'http://localhost/v1', 'description': 'local docker'},
10621062
{'url': 'http://localhost:8000/v1', 'description': 'local dev'},
10631063
{'url': 'https://api.example.com/v1', 'description': 'demo server'},
10641064
{'url': '{serverURL}', 'description': 'provide your server URL',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
black==21.7b0
1+
black==21.9b0
22
flake8==3.9.2
33
flake8-isort==4.0.0
44
isort==5.9.3
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
recommonmark==0.7.1
2-
Sphinx==4.1.2
3-
sphinx_rtd_theme==0.5.2
2+
Sphinx==4.2.0
3+
sphinx_rtd_theme==1.0.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
django-filter==2.4.0
1+
django-filter==21.1
22
django-polymorphic==3.0.0
33
pyyaml==5.4.1
44
uritemplate==3.0.1

0 commit comments

Comments
 (0)