From 6e7c9594fe0c59802c9d274819915e2c9314e0f8 Mon Sep 17 00:00:00 2001 From: Jimmy Gitonga Date: Fri, 28 Apr 2017 18:08:54 +0300 Subject: [PATCH] Updating the Django version "runserver" output and enforcing code block styling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CHANGED the Django version run server output to “1.11” ADDED “```” to a code block on line 44 of “/tutorial/7-schemas-and-client-libraries/“ to enforce code wrap. Perhaps, we might need to do this to all code blocks. I would be happy to do that. --- docs/tutorial/1-serialization.md | 2 +- docs/tutorial/7-schemas-and-client-libraries.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index fa54ca6a3..558797816 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -310,7 +310,7 @@ Quit out of the shell... Validating models... 0 errors found - Django version 1.8.3, using settings 'tutorial.settings' + Django version 1.11, using settings 'tutorial.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. diff --git a/docs/tutorial/7-schemas-and-client-libraries.md b/docs/tutorial/7-schemas-and-client-libraries.md index e7bcfbafb..4d7193986 100644 --- a/docs/tutorial/7-schemas-and-client-libraries.md +++ b/docs/tutorial/7-schemas-and-client-libraries.md @@ -36,6 +36,7 @@ API schema. We can now include a schema for our API, by including an autogenerated schema view in our URL configuration. +``` from rest_framework.schemas import get_schema_view schema_view = get_schema_view(title='Pastebin API') @@ -44,6 +45,7 @@ view in our URL configuration.    url(r'^schema/$', schema_view), ... ] +``` If you visit the API root endpoint in a browser you should now see `corejson` representation become available as an option.