Django查看了几次更新

时间:2015-10-05 08:58:41

标签: python django templates

当我调试我的django项目时,我看到我的视图在控制台中多次更新:

Hello
[05/Oct/2015 08:11:48]"GET /Appl/Products/ HTTP/1.1" 200 10899
Hello
[05/Oct/2015 08:11:48]"GET /static/Start%20Application/jquery/1.10.4/jquery-ui.js HTTP/1.1" 404 1753
[05/Oct/2015 08:11:48]"GET /Appl/Products/%7B%%20static HTTP/1.1" 200 10899
Hello
[05/Oct/2015 08:11:48]"GET /Appl/Products/js/queryLoader.js HTTP/1.1" 200 10899
[05/Oct/2015 08:11:48]"GET /static/Start%20Application/jquery/1.10.4/jquery-ui.js HTTP/1.1" 404 1753

这是我的代码:

def products(request):
    print "Hello"
    template = loader.get_template('Template.html')
    context = RequestContext(request)
    return HttpResponse(template.render(context))

如何解决这个问题?

0 个答案:

没有答案