I have been working through W3 Schools Django and reviewing my urls.py configuration file code.
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('', include('members.urls')),
path('admin/', admin.site.urls),
]
What does contrib
mean with from django.contrib import admin
?
What does include
mean with from django.urls import include, path
?
What does urlpatterns
actually mean ?
Is it a list that takes requests for urls or is it a tuple with a list of url requests ?
With path('', include('members.urls')),
My understanding is that this is gives 127.0.0.1:8000/members/
How does include work with this and why does members.urls need a dot ?
With path('admin/', admin.site.urls),
My understanding is that this gives 127.0.0.1:8000/admin/
Why does it need dots with admin.site.urls ?