0

我已将 facebook 身份验证添加到我的 django 应用程序,但是当我单击Login with Facebook按钮时,我收到此错误:

ModuleNotFoundError: No module named 'account'

我有一个名为 的应用程序accounts,它位于我INSTALLED_APPS的部分settings.py

这是我的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 %}

我正在使用默认的 django 登录视图。
错误在哪里?

4

0 回答 0