From db635fa6327d8d3ac3b06886c5f459b5c5a5cd04 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sun, 28 Oct 2012 19:37:27 +0000 Subject: Minor fixes --- docs/tutorial/2-requests-and-responses.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/tutorial/2-requests-and-responses.md') diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md index 76803d24..938739fa 100644 --- a/docs/tutorial/2-requests-and-responses.md +++ b/docs/tutorial/2-requests-and-responses.md @@ -114,8 +114,8 @@ Now update the `urls.py` file slightly, to append a set of `format_suffix_patter from rest_framework.urlpatterns import format_suffix_patterns urlpatterns = patterns('snippet.views', - url(r'^$', 'snippet_list'), - url(r'^(?P[0-9]+)$', 'snippet_detail') + url(r'^snippets/$', 'snippet_list'), + url(r'^snippets/(?P[0-9]+)$', 'snippet_detail') ) urlpatterns = format_suffix_patterns(urlpatterns) @@ -128,7 +128,7 @@ Go ahead and test the API from the command line, as we did in [tutorial part 1][ **TODO: Describe using accept headers, content-type headers, and format suffixed URLs** -Now go and open the API in a web browser, by visiting [http://127.0.0.1:8000/][devserver]." +Now go and open the API in a web browser, by visiting [http://127.0.0.1:8000/snippets/][devserver]." **Note: Right now the Browseable API only works with the CBV's. Need to fix that.** @@ -144,7 +144,7 @@ See the [browsable api][browseable-api] topic for more information about the bro In [tutorial part 3][tut-3], we'll start using class based views, and see how generic views reduce the amount of code we need to write. [json-url]: http://example.com/api/items/4.json -[devserver]: http://127.0.0.1:8000/ +[devserver]: http://127.0.0.1:8000/snippets/ [browseable-api]: ../topics/browsable-api.md [tut-1]: 1-serialization.md [tut-3]: 3-class-based-views.md -- cgit v1.2.3