【发布时间】:2019-08-08 01:33:53
【问题描述】:
我将此库导入到我的 django 项目中:https://github.com/percipient/django-allauth-2fa/blob/master/allauth_2fa/views.py。
我不断收到此错误:
TemplateDoesNotExist at /setup/
base.html
In template C:\Users\Davide\lib\site-packages\allauth_2fa\templates\allauth_2fa\setup.html, error at line 1
1 {% extends 'base.html' %}
我不知道为什么它会显示该错误,因为我在 project/templates 创建了自己的 setup.html,它看起来像这样:
**{% extends 'main/header.html' %}**
{% load i18n %}
{% block content %}
//
我的 urls.py 看起来像这样:
from allauth_2fa import views as allauth_2fa_views
app_name = "project"
urlpatterns = [
path("setup/", allauth_2fa_views.TwoFactorSetup.as_view(), name="setup"),
// Other urls
【问题讨论】:
标签: python django django-templates django-views django-urls