When i am trying to go admin path in the it is giving me error that saying that site matching query does not exist this never happens to me before
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'))
]
here is my main project url
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')
]
my app urls
CodePudding user response:
It is most likely something to do with your urls
. Please double check you have included the admin route in the urls and make sure there are no path conflicts. For more help, you should paste your code of urls or settings where you think the error might be.
This is the admin path for reference:
from django.contrib import admin
urlpatterns = [path("admin/", admin.site.urls)]