In a django online course, the instructor has us use the url() function to call views and utilize regular expressions in the urlpatterns list. I\'ve seen other
The new django.urls.path() function allows a simpler, more readable URL routing syntax. For example, this example from previous Django releases:
url(r'^articles/(?P[0-9]{4})/$', views.year_archive)
could be written as:
path('articles//', views.year_archive)
The django.conf.urls.url() function from previous versions is now available as django.urls.re_path(). The old location remains for backwards compatibility, without an imminent deprecation. The old django.conf.urls.include() function is now importable from django.urls so you can use:
from django.urls import include, path, re_path
in the URLconfs. For further reading django doc