2012-02-14 35 views
0

標題幾乎總結起來 - 我有一個模板本文標籤:網址標籤拒絕找到看法,即使它就在views.py和urls.py

<a href="{% url mainapp.views.send_registration_email_view user_email=for_user.email,company_number=company.pk,organisation='org' %}"> 

與這urls.py :

(r'^send/registrationlink/(?P<user_email>[^/]+)/(?P<company_number>[^/]+)/(?P<organisation>\w+)/?$', 'mainapp.views.send_registration_email_view'), 

而這mainapp/views.py:

def send_registration_email_view(request, user_email = None, company_number = None, organisation = None): 

然而,試圖查看其進口模板的頁面,其中PR oblematic線被發現,導致這個錯誤:

TemplateSyntaxError: Caught NoReverseMatch while rendering: Reverse for 'mainapp.views.send_registration_email_view' with arguments '()' and keyword arguments '{'organisation': u'org', 'company_number': u'UN58e2391e-51a5-11e1-bb6a-e89a8f7f9c14', 'user_email': ''}' not found. 

我也有相同的模板這些標籤,他們很好地工作:

<a href="{% url mainapp.views.registration_view for_user=for_user %}"> 
<a href="{% url mainapp.views.consent_view for_user=for_user %}"> 

所以 - 沒有人知道爲什麼Django不像我在做什麼?

回答