aboutsummaryrefslogtreecommitdiffstats
path: root/docs/tutorial
diff options
context:
space:
mode:
authorTom Christie2013-05-05 18:12:35 +0100
committerTom Christie2013-05-05 18:12:35 +0100
commitb70c9cc107743b45edc50c4b4e5e6a7d5a856f01 (patch)
tree2949ff7eda5c81aff8fdfd4d97a7cef8ad55f1c3 /docs/tutorial
parent75b2afcb23d0968d4c7115243cdfaa778da5dca4 (diff)
parent287ff43cdd85a5c2275205bf37e19dea3f69ad01 (diff)
downloaddjango-rest-framework-b70c9cc107743b45edc50c4b4e5e6a7d5a856f01.tar.bz2
Merge master
Diffstat (limited to 'docs/tutorial')
-rw-r--r--docs/tutorial/2-requests-and-responses.md8
-rw-r--r--docs/tutorial/4-authentication-and-permissions.md8
-rw-r--r--docs/tutorial/5-relationships-and-hyperlinked-apis.md2
-rw-r--r--docs/tutorial/quickstart.md4
4 files changed, 13 insertions, 9 deletions
diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md
index 63cee3a6..3a002cb0 100644
--- a/docs/tutorial/2-requests-and-responses.md
+++ b/docs/tutorial/2-requests-and-responses.md
@@ -140,7 +140,7 @@ We can control the format of the response that we get back, either by using the
Or by appending a format suffix:
curl http://127.0.0.1:8000/snippets/.json # JSON suffix
- curl http://127.0.0.1:8000/snippets/.api # Browseable API suffix
+ curl http://127.0.0.1:8000/snippets/.api # Browsable API suffix
Similarly, we can control the format of the request that we send, using the `Content-Type` header.
@@ -160,9 +160,9 @@ Now go and open the API in a web browser, by visiting [http://127.0.0.1:8000/sni
Because the API chooses the content type of the response based on the client request, it will, by default, return an HTML-formatted representation of the resource when that resource is requested by a web browser. This allows for the API to return a fully web-browsable HTML representation.
-Having a web-browseable API is a huge usability win, and makes developing and using your API much easier. It also dramatically lowers the barrier-to-entry for other developers wanting to inspect and work with your API.
+Having a web-browsable API is a huge usability win, and makes developing and using your API much easier. It also dramatically lowers the barrier-to-entry for other developers wanting to inspect and work with your API.
-See the [browsable api][browseable-api] topic for more information about the browsable API feature and how to customize it.
+See the [browsable api][browsable-api] topic for more information about the browsable API feature and how to customize it.
## What's next?
@@ -170,6 +170,6 @@ In [tutorial part 3][tut-3], we'll start using class based views, and see how ge
[json-url]: http://example.com/api/items/4.json
[devserver]: http://127.0.0.1:8000/snippets/
-[browseable-api]: ../topics/browsable-api.md
+[browsable-api]: ../topics/browsable-api.md
[tut-1]: 1-serialization.md
[tut-3]: 3-class-based-views.md
diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md
index d3ee8e79..8bb3164b 100644
--- a/docs/tutorial/4-authentication-and-permissions.md
+++ b/docs/tutorial/4-authentication-and-permissions.md
@@ -118,17 +118,17 @@ Then, add the following property to **both** the `SnippetList` and `SnippetDetai
permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
-## Adding login to the Browseable API
+## Adding login to the Browsable API
-If you open a browser and navigate to the browseable API at the moment, you'll find that you're no longer able to create new code snippets. In order to do so we'd need to be able to login as a user.
+If you open a browser and navigate to the browsable API at the moment, you'll find that you're no longer able to create new code snippets. In order to do so we'd need to be able to login as a user.
-We can add a login view for use with the browseable API, by editing our URLconf once more.
+We can add a login view for use with the browsable API, by editing our URLconf once more.
Add the following import at the top of the file:
from django.conf.urls import include
-And, at the end of the file, add a pattern to include the login and logout views for the browseable API.
+And, at the end of the file, add a pattern to include the login and logout views for the browsable API.
urlpatterns += patterns('',
url(r'^api-auth/', include('rest_framework.urls',
diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md
index c9c37547..cb2e092c 100644
--- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md
+++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md
@@ -149,7 +149,7 @@ We could also customize the pagination style if we needed too, but in this case
## Browsing the API
-If we open a browser and navigate to the browseable API, you'll find that you can now work your way around the API simply by following links.
+If we open a browser and navigate to the browsable API, you'll find that you can now work your way around the API simply by following links.
You'll also be able to see the 'highlight' links on the snippet instances, that will take you to the highlighted code HTML representations.
diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md
index a7716105..627724c7 100644
--- a/docs/tutorial/quickstart.md
+++ b/docs/tutorial/quickstart.md
@@ -76,7 +76,11 @@ Because we're using viewsets instead of views, we can automatically generate the
Again, if we need more control over the API URLs we can simply drop down to using regular class based views, and writing the URL conf explicitly.
+<<<<<<< HEAD
Note that we're also including default login and logout views for use with the browsable API. That's optional, but useful if your API requires authentication and you want to use the browseable API.
+=======
+Finally, we're including default login and logout views for use with the browsable API. That's optional, but useful if your API requires authentication and you want to use the browsable API.
+>>>>>>> master
## Settings