为什么它只打印两个值?
这是我的输出:
这是views.py
import json
from django.http import HttpResponse
from django.template import Context, RequestContext
from django.shortcuts import render_to_response, get_object_or_404
def callback(request):
verification_code = request.GET.get('verification_code')
userid = request.GET.get('userid')
userid1 = request.GET.get('userid1')
userid2 = request.GET.get('userid2')
userid3 = request.GET.get('userid3')
context = {
'verification_code': verification_code,
'userid': userid,
'userid1': userid1,
'userid2': userid2,
'userid3': userid3,
}
return render_to_response('wings/callback.html', context,
context_instance=RequestContext(request))
def detail(request):
response_data = {}
response_data['result'] = 'failed'
response_data['message'] = 'You messed up'
return HttpResponse(json.dumps(response_data), content_type="application/json")
这是回调.html
<!-- callback.html -->
verification_code: {{verification_code }}<br />
userid: {{userid }} <br />
userid1: {{userid1 }} <br />
userid2: {{userid2 }} <br />
userid3: {{userid3 }} <br />
编辑:
正如建议的那样,我编辑并放置<br/>
但没有改变
编辑: 尝试使用 django 服务器时,我得到了所有值,但是一旦我转移到 apache,它就会显示出这种奇怪的行为