Skip to content

Commit 8c1fa0b

Browse files
committed
2 parents f387cd8 + ab1d436 commit 8c1fa0b

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/topics/ajax-csrf-cors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you’re building a JavaScript client to interface with your Web API, you'll
1010

1111
AJAX requests that are made within the same context as the API they are interacting with will typically use `SessionAuthentication`. This ensures that once a user has logged in, any AJAX requests made can be authenticated using the same session-based authentication that is used for the rest of the website.
1212

13-
AJAX requests that are made on a different site from the API they are communicating with will typically need to use a non-session-based authentication scheme, such as `TokenAuthentication`.
13+
AJAX requests that are made on a different site from the API they are communicating with will typically need to use a non-session-based authentication scheme, such as `TokenAuthentication`.
1414

1515
## CSRF protection
1616

@@ -19,7 +19,7 @@ AJAX requests that are made on a different site from the API they are communicat
1919
To guard against these type of attacks, you need to do two things:
2020

2121
1. Ensure that the 'safe' HTTP operations, such as `GET`, `HEAD` and `OPTIONS` cannot be used to alter any server-side state.
22-
2. Ensure that any 'unsafe' HTTP operations, such as `POST`, `PUT`, `PATCH` and `DELETE`, always require a valid CSRF token.
22+
2. Ensure that any 'unsafe' HTTP operations, such as `POST`, `PUT`, `PATCH` and `DELETE`, always require a valid CSRF token.
2323

2424
If you're using `SessionAuthentication` you'll need to include valid CSRF tokens for any `POST`, `PUT`, `PATCH` or `DELETE` operations.
2525

@@ -35,7 +35,7 @@ The best way to deal with CORS in REST framework is to add the required response
3535

3636
[cite]: http://www.codinghorror.com/blog/2008/10/preventing-csrf-and-xsrf-attacks.html
3737
[csrf]: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)
38-
[csrf-ajax]: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax
38+
[csrf-ajax]: https://docs.djangoproject.com/en/dev/ref/csrf/#ajax
3939
[cors]: http://www.w3.org/TR/cors/
4040
[ottoyiu]: https://github.com/ottoyiu/
4141
[django-cors-headers]: https://github.com/ottoyiu/django-cors-headers/

docs/topics/contributing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ There are many ways you can contribute to Django REST framework. We'd like it t
1010

1111
The most important thing you can do to help push the REST framework project forward is to be actively involved wherever possible. Code contributions are often overvalued as being the primary way to get involved in a project, we don't believe that needs to be the case.
1212

13-
If you use REST framework, we'd love you to be vocal about your experiences with it - you might consider writing a blog post about using REST framework, or publishing a tutorial about building a project with a particular Javascript framework. Experiences from beginners can be particularly helpful because you'll be in the best position to assess which bits of REST framework are more difficult to understand and work with.
13+
If you use REST framework, we'd love you to be vocal about your experiences with it - you might consider writing a blog post about using REST framework, or publishing a tutorial about building a project with a particular JavaScript framework. Experiences from beginners can be particularly helpful because you'll be in the best position to assess which bits of REST framework are more difficult to understand and work with.
1414

15-
Other really great ways you can help move the community forward include helping answer questions on the [discussion group][google-group], or setting up an [email alert on StackOverflow][so-filter] so that you get notified of any new questions with the `django-rest-framework` tag.
15+
Other really great ways you can help move the community forward include helping to answer questions on the [discussion group][google-group], or setting up an [email alert on StackOverflow][so-filter] so that you get notified of any new questions with the `django-rest-framework` tag.
1616

1717
When answering questions make sure to help future contributors find their way around by hyperlinking wherever possible to related threads and tickets, and include backlinks from those items if relevant.
1818

@@ -33,7 +33,7 @@ Some tips on good issue reporting:
3333
* When describing issues try to phrase your ticket in terms of the *behavior* you think needs changing rather than the *code* you think need changing.
3434
* Search the issue list first for related items, and make sure you're running the latest version of REST framework before reporting an issue.
3535
* If reporting a bug, then try to include a pull request with a failing test case. This will help us quickly identify if there is a valid issue, and make sure that it gets fixed more quickly if there is one.
36-
* Feature requests will often be closed with a recommendation that they be implemented outside of the core REST framework library. Keeping new feature requests implemented as third party libraries allows us to keep down the maintainence overhead of REST framework, so that the focus can be on continued stability, bugfixes, and great documentation.
36+
* Feature requests will often be closed with a recommendation that they be implemented outside of the core REST framework library. Keeping new feature requests implemented as third party libraries allows us to keep down the maintenance overhead of REST framework, so that the focus can be on continued stability, bugfixes, and great documentation.
3737
* Closing an issue doesn't necessarily mean the end of a discussion. If you believe your issue has been closed incorrectly, explain why and we'll consider if it needs to be reopened.
3838

3939
## Triaging issues
@@ -52,7 +52,7 @@ To start developing on Django REST framework, clone the repo:
5252

5353
git clone [email protected]:tomchristie/django-rest-framework.git
5454

55-
Changes should broadly follow the [PEP 8][pep-8] style conventions, and we recommend you setup your editor to automatically indicated non-conforming styles.
55+
Changes should broadly follow the [PEP 8][pep-8] style conventions, and we recommend you set up your editor to automatically indicate non-conforming styles.
5656

5757
## Testing
5858

@@ -117,7 +117,7 @@ GitHub's documentation for working on pull requests is [available here][pull-req
117117

118118
Always run the tests before submitting pull requests, and ideally run `tox` in order to check that your modifications are compatible with both Python 2 and Python 3, and that they run properly on all supported versions of Django.
119119

120-
Once you've made a pull request take a look at the travis build status in the GitHub interface and make sure the tests are runnning as you'd expect.
120+
Once you've made a pull request take a look at the Travis build status in the GitHub interface and make sure the tests are running as you'd expect.
121121

122122
![Travis status][travis-status]
123123

@@ -131,7 +131,7 @@ Sometimes, in order to ensure your code works on various different versions of D
131131

132132
The documentation for REST framework is built from the [Markdown][markdown] source files in [the docs directory][docs].
133133

134-
There are many great markdown editors that make working with the documentation really easy. The [Mou editor for Mac][mou] is one such editor that comes highly recommended.
134+
There are many great Markdown editors that make working with the documentation really easy. The [Mou editor for Mac][mou] is one such editor that comes highly recommended.
135135

136136
## Building the documentation
137137

@@ -153,7 +153,7 @@ Some other tips:
153153

154154
* Keep paragraphs reasonably short.
155155
* Use double spacing after the end of sentences.
156-
* Don't use the abbreviations such as 'e.g.' but instead use long form, such as 'For example'.
156+
* Don't use abbreviations such as 'e.g.' but instead use the long form, such as 'For example'.
157157

158158
## Markdown style
159159

@@ -186,7 +186,7 @@ If you are hyperlinking to another REST framework document, you should use a rel
186186

187187
[authentication]: ../api-guide/authentication.md
188188

189-
Linking in this style means you'll be able to click the hyperlink in your markdown editor to open the referenced document. When the documentation is built, these links will be converted into regular links to HTML pages.
189+
Linking in this style means you'll be able to click the hyperlink in your Markdown editor to open the referenced document. When the documentation is built, these links will be converted into regular links to HTML pages.
190190

191191
##### 3. Notes
192192

0 commit comments

Comments
 (0)