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 trialAmmar Fatihallah
7,417 PointsNo 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 ?
Ammar Fatihallah
7,417 PointsHere's an image of the error. http://store6.up-00.com/2017-02/148659910973781.jpg
3 Answers
João Elvas
5,400 PointsHello 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
Ammar Fatihallah
7,417 PointsThank you so much man!
Chris Freeman
Treehouse Moderator 68,441 PointsIt would help to see the urls.py
and views
files Please check the following:
Do you have a urls.py
file with a URL defined for the view views.HelloWorld
and the spelling and case match.
Does the URL in the urls.py
file have a name
argument with a different value than "HelloWorld"?
In the template, is the view name in quotes?
Jonathan Prada
7,039 PointsThank João Elvas
Steven Parker
231,236 PointsSteven Parker
231,236 PointsTo 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.