I've got an issue with my Django app, when i try to browse to http://127.0.0.1:8000/list/ it returns a 404 error :
Using the URLconf defined in f_django.urls, Django tried these URL patterns, in this order:
^contact/$
^description/$
^$
myapp/
admin/
The current path, list/, didn't match any of these.
Here my urls.py file :
from django.contrib import admin
from django.urls import path
from django.conf.urls import url
from django.urls import include
from . import views
urlpatterns = [
url(r'^contact/$',views.contact),
url(r'^description/$',views.description),
url(r'^$',include('myapp.urls')),
path('myapp/',include('myapp.urls')),
path('admin/', admin.site.urls),
]
My myapp/urls.py file :
from django.conf.urls import url
from django.urls import path
from . import views
urlpatterns = [
url(r'^$',views.index),
url(r'^list',views.list),
url(r'^Articles/(?P<id>[0-9]+)$', views.details),
]
And this line in my settings.py :
INSTALLED_APPS = [
'myapp.apps.MyappConfig',
]
Thanks in advance for your help
question from:
https://stackoverflow.com/questions/66049340/django-path-return-404 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…