I have following HTML file
<!DOCTYPE html>
<body>
{% for champion in champions %}
<a href="{% url 'guide_form' %}{{champion}}">{{champion}}</a>
{% endfor %}
</body>
</html>
And these are my URLS
urlpatterns = patterns('', url(r'^select_champion/$', views.select_champion, name='select_champion'),
url(r'^guide_form/(?P<champion>\w+)/$', views.guide_form, name='guide_form'),
url(r'^create_guide/$', views.create_guide, name='create_guide'),
url(r'^get_guide/(?P<id>\d+)/$', views.get_guide, name='get_guide'),
url(r'^guide_list/(?P<champion>\w+)/$', views.get_guide_list, name='get_guide_list'),
)
When I try to select a champion I get following Error:
Reverse for 'guide_form' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: ['guides/guide_form/(?P\w+)/$']
When I change this line
<a href="{% url 'guide_form' %}{{champion}}">{{champion}}</a>
To this
<a href="{% url 'create_guide' %}{{champion}}">{{champion}}</a>
I don't get an Error but the wrong URL is called of course. I want to select a champion and want the champ to be delivered per url so a guide can be written about him in the guide form. Do you have any suggestion on how to solve my problem?