【发布时间】:2021-12-31 17:43:03
【问题描述】:
当我尝试进入管理路径时,它给了我一个错误,说站点匹配查询不存在,这在我之前从未发生过
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('', include('core.urls', namespace='core'))
]
这是我的主要项目网址
from django.urls import path
from .views import (
ItemDetailView,
CheckoutView,
HomeView,
OrderSummaryView,
add_to_cart,
remove_from_cart,
remove_single_item_from_cart,
PaymentView,
AddCouponView,
RequestRefundView
)
app_name = 'core'
urlpatterns = [
path('', HomeView.as_view(), name='home'),
path('checkout/', CheckoutView.as_view(), name='checkout'),
path('order-summary/', OrderSummaryView.as_view(), name='order-summary'),
path('product/<slug>/', ItemDetailView.as_view(), name='product'),
path('add-to-cart/<slug>/', add_to_cart, name='add-to-cart'),
path('add-coupon/', AddCouponView.as_view(), name='add-coupon'),
path('remove-from-cart/<slug>/', remove_from_cart, name='remove-from-cart'),
path('remove-item-from-cart/<slug>/', remove_single_item_from_cart,
name='remove-single-item-from-cart'),
path('payment/<payment_option>/', PaymentView.as_view(), name='payment'),
path('request-refund/', RequestRefundView.as_view(), name='request-refund')
]
我的应用网址
【问题讨论】:
标签: django django-models django-views django-forms django-templates