Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

redirect in dajango

from django.http import HttpResponse
from django.template import loader

def my_view(request):
    # View code here...
    t = loader.get_template('myapp/index.html')
    c = {'foo': 'bar'}
    return HttpResponse(t.render(c, request), content_type='application/xhtml+xml')
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #redirect #dajango
ADD COMMENT
Topic
Name
8+1 =