Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
52e0f3ae
Commit
52e0f3ae
authored
Aug 14, 2017
by
Berker Peksag
Committed by
Tom Christie
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation of code example in chapter 7 (#5329)
parent
be7657c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
docs/tutorial/7-schemas-and-client-libraries.md
+7
-7
No files found.
docs/tutorial/7-schemas-and-client-libraries.md
View file @
52e0f3ae
...
...
@@ -36,15 +36,15 @@ 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
```
python
from
rest_framework.schemas
import
get_schema_view
schema_view = get_schema_view(title='Pastebin API')
schema_view
=
get_schema_view
(
title
=
'Pastebin API'
)
urlpatterns = [
url(r'^schema/$', schema_view),
...
]
urlpatterns
=
[
url
(
r'^schema/$'
,
schema_view
),
...
]
```
If you visit the API root endpoint in a browser you should now see
`corejson`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment