NoReverseMatch Django URL
What view are you attempting to call? You are calling the URL on the name
view, but the name
does not exist. Since you only have one named view, home
, I'll assume that's the view you are trying to use.
Neither your view nor your URLs takes an argument, yet you are passing result.name
as an argument in the URL.
You need to either accept a parameter in your view via def Link(request, result_name):
and capture it in your URL via a regex with (?P<result_name>..
, or call your URL without the passed parameter:
{% for result in results %}
<a href="{% url home %}">test</a>
Since you have no logic in your views yet, and are passing a multi-word parameter and not "slugifying" it - I'm going to assume you want to do the latter and just remove the parameter from your URL call.