NoReverseMatch at / 'movies' is not a registered namespace

In the Python Mastery Course > 12- Building Web Applications with Django > 20- Adding the Homepage I get the below error:

NoReverseMatch at /

‘movies’ is not a registered namespace

Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 3.2.9
Exception Type: NoReverseMatch
Exception Value: ‘movies’ is not a registered namespace
Exception Location: C:\Users\Prithveen.virtualenvs\vidly3-x4_-JjT6\lib\site-packages\django\urls\base.py, line 82, in reverse
Python Executable: C:\Users\Prithveen.virtualenvs\vidly3-x4_-JjT6\Scripts\python.exe
Python Version: 3.9.0
Python Path: ['C:\Users\Prithveen\Desktop\Coding\Code with Mosh\The Complete Python ’ ‘Course\12- Building Web Applications with Django\vidly3’, ‘c:\users\prithveen\appdata\local\programs\python\python39\python39.zip’, ‘c:\users\prithveen\appdata\local\programs\python\python39\DLLs’, ‘c:\users\prithveen\appdata\local\programs\python\python39\lib’, ‘c:\users\prithveen\appdata\local\programs\python\python39’, ‘C:\Users\Prithveen\.virtualenvs\vidly3-x4_-JjT6’, ‘C:\Users\Prithveen\.virtualenvs\vidly3-x4_-JjT6\lib\site-packages’]
Server time: Fri, 12 Nov 2021 14:48:20 +0000

My guess is it has something to with the url tag. I’m not so sure though.

Any help is appreciated.

Hey @GP101, Welcome to the forums.

I had a similar issue where the namespace in the urls.py was mistyped.

If you are still having issues, please post both “urls.py” and the “views.py” so we can better diagnose the issue.

2 Likes

Thank you for your reply.

I was able to fix the issue. As per the Python Mastery Course > 12- Building Web Applications with Django > 18- Referencing URLs, I had to include app_name = “movies” in order for this to work.

Appreciate the support!

1 Like