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:
@@ -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()``
|
||||
========================
|
||||
|
||||
Reference in New Issue
Block a user