mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-04 12:23:17 +03:00
Updating the Django version "runserver" output and enforcing code block styling
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.
This commit is contained in:
parent
80d0ee563a
commit
6e7c9594fe
|
@ -310,7 +310,7 @@ Quit out of the shell...
|
||||||
Validating models...
|
Validating models...
|
||||||
|
|
||||||
0 errors found
|
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/
|
Development server is running at http://127.0.0.1:8000/
|
||||||
Quit the server with CONTROL-C.
|
Quit the server with CONTROL-C.
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ API schema.
|
||||||
We can now include a schema for our API, by including an autogenerated schema
|
We can now include a schema for our API, by including an autogenerated schema
|
||||||
view in our URL configuration.
|
view in our URL configuration.
|
||||||
|
|
||||||
|
```
|
||||||
from rest_framework.schemas import get_schema_view
|
from rest_framework.schemas import get_schema_view
|
||||||
|
|
||||||
schema_view = get_schema_view(title='Pastebin API')
|
schema_view = get_schema_view(title='Pastebin API')
|
||||||
|
@ -44,6 +45,7 @@ view in our URL configuration.
|
||||||
url(r'^schema/$', schema_view),
|
url(r'^schema/$', schema_view),
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
```
|
||||||
|
|
||||||
If you visit the API root endpoint in a browser you should now see `corejson`
|
If you visit the API root endpoint in a browser you should now see `corejson`
|
||||||
representation become available as an option.
|
representation become available as an option.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user