Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Basics Final Details url Tag

No reverse match at /

I was following the video till i got into this error that i don't know how to fix. The error says Reverse for 'views.HelloWorld' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [].

Any suggestions ?

Steven Parker
Steven Parker
231,236 Points

To make an analysis possible, show your (properly formatted) code. Or better yet, make a snapshot of your workspace and post the link to it here.

3 Answers

João Elvas
João Elvas
5,400 Points

Hello m8,

The video is old and you are probably working with django 1.10

For this to work you have to name all of your URLs as:

url(r'^$', views.hello_world, name='hello')

And then in the layout.html you just use the name:

<a href="{% url 'hello' %}">Home</a>

Good Luck

Thank you so much man!

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,441 Points

It would help to see the urls.py and views files Please check the following:

:point_right: Do you have a urls.py file with a URL defined for the view views.HelloWorld and the spelling and case match.

:point_right: Does the URL in the urls.py file have a name argument with a different value than "HelloWorld"?

:point_right: In the template, is the view name in quotes?