mirror of
https://github.com/django/django.git
synced 2025-08-18 17:50:58 +00:00
[1.9.x] Fixed #26021 -- Applied hanging indentation to docs.
Backport of 4a4d7f980e
from master
This commit is contained in:
parent
a0ebfa0c56
commit
6d0c9f95da
21 changed files with 185 additions and 107 deletions
|
@ -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()``
|
||||
========================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue