我正在使用Django框架开发一个名为btre_proect的项目,现在我正在使用Register,但是发现了404错误,
我的urls.py(帐户)代码是
from django.urls import path
from . import views
urlpatterns = [
path('login', views.login, name='login'),
path('register', views.register, name='register'),
path('logout', views.logout, name='logout'),
path('dashboard', views.dashboard,name='dashboard')
]
urls.py(btre_project)代码是
from django.contrib import admin
from django.urls import path,include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('',include('pages.urls')),
path('listings/',include('listings.urls')),
path('accounts/',include('accounts.urls')),
path('admin/', admin.site.urls),
] +
static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
我遇到这种类型的错误
答案 0 :(得分:0)
哦,我得到了答案,views.py(urls.py)中出现错误,最终找到了它