📜  在 dajango 中重定向 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:41.782000             🧑  作者: Mango

代码示例2
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')