Python 3.x ModuleNotFoundError:没有名为';账户';
我已将facebook身份验证添加到我的django应用程序中,但当我单击“使用facebook登录”按钮时,出现以下错误:Python 3.x ModuleNotFoundError:没有名为';账户';,python-3.x,django,account,django-socialauth,modulenotfounderror,Python 3.x,Django,Account,Django Socialauth,Modulenotfounderror,我已将facebook身份验证添加到我的django应用程序中,但当我单击“使用facebook登录”按钮时,出现以下错误: ModuleNotFoundError: No module named 'account' 我有一个名为accounts的应用程序,它位于settings.py的INSTALLED\u APPS部分 这是我的login.html模板: {% extends "base.html" %} {% block title %}Log-in{% endb
ModuleNotFoundError: No module named 'account'
我有一个名为accounts
的应用程序,它位于settings.py的INSTALLED\u APPS
部分
这是我的login.html
模板:
{% extends "base.html" %}
{% block title %}Log-in{% endblock %}
{% block content %}
<h1>Log-in</h1>
{% if form.errors %}
<p>
Your username and password didn't match.
Please try again.
</p>
{% else %}
<p>Please, use the following form to log-in. If you don't have an account <a href="{% url "register" %}">register here</a></p>
{% endif %}
<div class="login-form">
<form action="{% url 'login' %}" method="post">
{{ form.as_p }}
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
<p><input type="submit" value="Log-in"></p>
</form>
<p><a href="{% url "password_reset" %}">Forgotten your password?</a></p>
</div>
<div class="social">
<ul>
<li class="facebook">
<a href="{% url "social:begin" "facebook" %}">Sign in with Facebook</a>
</li>
<li class="twitter">
<a href="#">Login with Twitter</a>
</li>
<li class="google">
<a href="#">Login with Google</a>
</li>
</ul>
</div>
{% endblock %}
{%extends“base.html”%}
{%block title%}登录{%endblock%}
{%block content%}
登录
{%if form.errors%}
您的用户名和密码不匹配。
请再试一次。
{%else%}
请使用以下表格登录。如果你没有账户
{%endif%}
{{form.as_p}}
{%csrf_令牌%}
-
-
-
{%endblock%}
我使用的是默认的django登录视图
错误在哪里?我猜是打字错误,你的应用程序被称为账户
,但你称它为账户
(大部分在设置中.py
在安装的应用程序
中)是的,谢谢。我刚刚意识到我在设置中使用了account而不是accounts.py