render()

render() method

from django.shortcuts import render

def my_view(request):
    # View code here...
    return render(request, 'myapp/index.html', {
        'foo': 'bar',
    }, content_type='application/xhtml+xml')

Combines a given template with a given context dictionary and returns an HttpResponse object with that rendered text.

render() — Structure map

Clickable & Draggable!

render() — Related pages: