0

所以我只安裝的Django註冊的網址,並從https://github.com/macdhuibh/django-registration-templates包括Django的註冊

我得到一個問題,在URL解析得到的模板,我得到

反向的「auth_password_reset」參數'()'和關鍵字 參數'{}'未找到。

以及許多其他....

urls.py:

#Other stuff, 

url(r'^accounts/', include('registration.backends.hmac.urls')), 

完全按照文檔中指定。 此外這裏是引發錯誤的HTML。它來自github的login.html。這是拋出這個錯誤的那個,但似乎我每次嘗試做一個從django註冊的auth_url.py的URL反向匹配時類似的東西。

{% extends "main/header.html" %} 
 
{% load i18n %} 
 

 
{% block content %} 
 
<form method="post" action="."> 
 
    {% csrf_token %} 
 
    {{ form.as_p }} 
 

 
    <input type="submit" value="{% trans 'Log in' %}" /> 
 
    <input type="hidden" name="next" value="{{ next }}" /> 
 
</form> 
 

 
<p>{% trans "Forgot password" %}? <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a>!</p> 
 
<p>{% trans "Not member" %}? <a href="{% url 'registration_register' %}">{% trans "Register" %}</a>!</p> 
 
{% endblock %}

在此先感謝。

回答

0

找出出了什麼問題, 我在應用程序的urls.py中添加了URL模式,而不是根項目的URL模式。

希望這可以幫助別人!