diff options
| author | Ed Henderson <ed@sharpertool.com> | 2016-06-02 12:56:13 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-06-03 11:49:52 -0400 |
| commit | 6d0c9f95da7084abf09170ca5a06bd47fd20f0c4 (patch) | |
| tree | 1775055fec0d52fd2c8b701f4c2f8ad8983b370f /docs/topics/http | |
| parent | a0ebfa0c56e16f8305d48dfa16666eb74e1350db (diff) | |
[1.9.x] Fixed #26021 -- Applied hanging indentation to docs.
Backport of 4a4d7f980e2a66756e1e424f7648dcd28ff765b7 from master
Diffstat (limited to 'docs/topics/http')
| -rw-r--r-- | docs/topics/http/shortcuts.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index 2575d78b09..e8c1995253 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -98,8 +98,9 @@ MIME type :mimetype:`application/xhtml+xml`:: def my_view(request): # View code here... - return render(request, 'myapp/index.html', {"foo": "bar"}, - content_type="application/xhtml+xml") + return render(request, 'myapp/index.html', { + 'foo': 'bar', + }, content_type='application/xhtml+xml') This example is equivalent to:: @@ -110,8 +111,7 @@ This example is equivalent to:: # View code here... t = loader.get_template('myapp/index.html') c = {'foo': 'bar'} - return HttpResponse(t.render(c, request), - content_type="application/xhtml+xml") + return HttpResponse(t.render(c, request), content_type='application/xhtml+xml') ``render_to_response()`` ======================== |
