Django 15-Url parameters

New to python,
Up to this point everything is working in the Web App Vidly.
Looking for YOUR input on correcting this error listed below …

When implementing this section 15-URL Parameters here what was edited, updated or added ,

edited & added to movies/url.py …
urlpatterns = [
path(‘’, views.index, name=‘movies_index’),
path(‘movie_id’, views.detail, name=‘movies_detail’) # works with movies/1 ex.
]

added to movies/views.py …

def detail(request, movie_id):
    return HttpResponse(movie_id)

added to vidly/settings.py
import os
from pathlib import Path

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        DIRS': [os.path.join(BASE_DIR,'templates')],

Everything works this far …
then cd … http://127.0.0.1:8000/movies/1 … here is the error

Page not found (404)

Request Method: GET
Request URL: http://127.0.0.1:8000/movies/1

Using the URLconf defined in vidly.urls, Django tried these URL patterns, in this order:

  1. admin/
  2. movies/ [name=‘movies_index’]
  3. movies/ movie_id [name=‘movies_detail’]

The current path, movies/1, didn’t match any of these.

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

I found the bug, in movies/urls.py we must use <> to define an argument. Ops, missing … the code should read like

path(‘<movie_id>’, views.detail, name=‘movies_detail’)

note <movie_id> nows defines the argument and when saved and restarted the server, it works !!!