I\'m new to Django and am trying to create the back end code for a music application on my website.
I have created the correct view in my views.py file (in the corre
url() is deprecated in newer version of django. So instead of using url use re_path() in your urls file as follows:
from django.urls import path, re_path
from . import views
urlpatterns = [
#url(r'^(?P[0-9]+)/$', views.detail, name='detail'),
path('', views.index, name='index'),
re_path(r'^(?P[0-9])/$', views.detail, name='detail'),
]