1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.10.x] Fixed #26021 -- Applied hanging indentation to docs.

Backport of 4a4d7f980e from master
This commit is contained in:
Ed Henderson
2016-06-02 12:56:13 -07:00
committed by Tim Graham
parent 971adb9e9c
commit 521772ff07
21 changed files with 185 additions and 107 deletions

View File

@@ -66,8 +66,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::
@@ -78,8 +79,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()``
========================