I have two apps: core and dm
Here's my code:
core/urls.py
urlpatterns = [
path('', views.index, name='index')
]
dm/urls.py
urlpatterns = [
path('', views.dm, name='dm'),
path('prices', views.dm_prices, name='prices')
]
mysite/urls.py
from core import views
from dm import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('core.urls')),
path("stripe/", include("djstripe.urls", namespace="djstripe")),
path('dm', include('dm.urls')),
path('dm/prices', include('dm.urls')),
]
And so, looking from the 404 page, I can see that the URLs he sees are:
- admin/
- [name='index']
- stripe/
- dm [name='dm']
- dm prices [name='prices']
- dm/prices [name='dm']
- dm/prices prices [name='prices']
I would be really happy if someone could explain to me how django reads the different URLs and how it orders them. Thanks a lot!