You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Standardize spelling to American English in documentation (#9804)
* Standardize spelling to American English (only in .md files)
* Update remaining British english spell words to American english style
* Configures the codespell pre-commit hook to enforce US English consistency
changes:
- Activates the `en-GB_to_en-US` built-in dictionary to flag British spellings
- Created codespell-ignore-words.txt file to ignore specific words
- include `code` and `names` for comprehensive typo checking in technical contexts.
- changed the 'lets' to 'let's'.
Copy file name to clipboardExpand all lines: docs/api-guide/authentication.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -416,7 +416,7 @@ JSON Web Token is a fairly new standard which can be used for token-based authen
416
416
417
417
## Hawk HTTP Authentication
418
418
419
-
The [HawkREST][hawkrest] library builds on the [Mohawk][mohawk] library to let you work with [Hawk][hawk] signed requests and responses in your API. [Hawk][hawk]lets two parties securely communicate with each other using messages signed by a shared key. It is based on [HTTP MAC access authentication][mac] (which was based on parts of [OAuth 1.0][oauth-1.0a]).
419
+
The [HawkREST][hawkrest] library builds on the [Mohawk][mohawk] library to let you work with [Hawk][hawk] signed requests and responses in your API. [Hawk][hawk]let's two parties securely communicate with each other using messages signed by a shared key. It is based on [HTTP MAC access authentication][mac] (which was based on parts of [OAuth 1.0][oauth-1.0a]).
Copy file name to clipboardExpand all lines: docs/api-guide/renderers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,7 @@ An example of a view that uses `TemplateHTMLRenderer`:
134
134
135
135
You can use `TemplateHTMLRenderer` either to return regular HTML pages using REST framework, or to return both HTML and API responses from a single endpoint.
136
136
137
-
If you're building websites that use `TemplateHTMLRenderer` along with other renderer classes, you should consider listing `TemplateHTMLRenderer` as the first class in the `renderer_classes` list, so that it will be prioritised first even for browsers that send poorly formed `ACCEPT:` headers.
137
+
If you're building websites that use `TemplateHTMLRenderer` along with other renderer classes, you should consider listing `TemplateHTMLRenderer` as the first class in the `renderer_classes` list, so that it will be prioritized first even for browsers that send poorly formed `ACCEPT:` headers.
138
138
139
139
See the [_HTML & Forms_ Topic Page][html-and-forms] for further examples of `TemplateHTMLRenderer` usage.
Copy file name to clipboardExpand all lines: docs/api-guide/responses.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ source:
11
11
12
12
REST framework supports HTTP content negotiation by providing a `Response` class which allows you to return content that can be rendered into multiple content types, depending on the client request.
13
13
14
-
The `Response` class subclasses Django's `SimpleTemplateResponse`. `Response` objects are initialised with data, which should consist of native Python primitives. REST framework then uses standard HTTP content negotiation to determine how it should render the final response content.
14
+
The `Response` class subclasses Django's `SimpleTemplateResponse`. `Response` objects are initialized with data, which should consist of native Python primitives. REST framework then uses standard HTTP content negotiation to determine how it should render the final response content.
15
15
16
16
There's no requirement for you to use the `Response` class, you can also return regular `HttpResponse` or `StreamingHttpResponse` objects from your views if required. Using the `Response` class simply provides a nicer interface for returning content-negotiated Web API responses, that can be rendered to multiple formats.
At this point we've translated the model instance into Python native datatypes. To finalise the serialization process we render the data into `json`.
51
+
At this point we've translated the model instance into Python native datatypes. To finalize the serialization process we render the data into `json`.
52
52
53
53
from rest_framework.renderers import JSONRenderer
54
54
@@ -155,7 +155,7 @@ When deserializing data, you always need to call `is_valid()` before attempting
155
155
serializer.is_valid()
156
156
# False
157
157
serializer.errors
158
-
# {'email': ['Enter a valid e-mail address.'], 'created': ['This field is required.']}
158
+
# {'email': ['Enter a valid email address.'], 'created': ['This field is required.']}
159
159
160
160
Each key in the dictionary will be the field name, and the values will be lists of strings of any error messages corresponding to that field. The `non_field_errors` key may also be present, and will list any general validation errors. The name of the `non_field_errors` key may be customized using the `NON_FIELD_ERRORS_KEY` REST framework setting.
161
161
@@ -298,7 +298,7 @@ When dealing with nested representations that support deserializing the data, an
298
298
serializer.is_valid()
299
299
# False
300
300
serializer.errors
301
-
# {'user': {'email': ['Enter a valid e-mail address.']}, 'created': ['This field is required.']}
301
+
# {'user': {'email': ['Enter a valid email address.']}, 'created': ['This field is required.']}
302
302
303
303
Similarly, the `.validated_data` property will include nested data structures.
304
304
@@ -430,7 +430,7 @@ The context dictionary can be used within any serializer field logic, such as a
430
430
431
431
Often you'll want serializer classes that map closely to Django model definitions.
432
432
433
-
The `ModelSerializer` class provides a shortcut that lets you automatically create a `Serializer` class with fields that correspond to the Model fields.
433
+
The `ModelSerializer` class provides a shortcut that let's you automatically create a `Serializer` class with fields that correspond to the Model fields.
434
434
435
435
**The `ModelSerializer` class is the same as a regular `Serializer` class, except that**:
0 commit comments