2014-09-02 29 views
0

HTMLhistorybp()得到了一個意想不到的關鍵字參數 '名'

"<td><h4><a href="/cyphys/{{user_name}}/historybp/{{current_patient_obj.patientID}}/">BP</a></h4></td>" 

這裏是views.py

@login_required 
def historybp(request, patientID): 
    context = { 'pid':patientID} 
    return HttpResponse("request for bp history received") 

,這裏是urls.py

url(r'^(?P<name>\w+)/historybp/(?P<patientID>\d+)/$', historybp), 

回答

0

你在你的URL的正則表達式有name ,所以你也需要將這個論點傳遞給你的觀點。

相關問題