I can't figure out why this one scenario of using {% url %}
with parameters in this template is tripping me up. I've done it before and it worked fine but I can't find what's wrong with this code.
urls.py
url(r'^promotions/$', views.promotions, name="promotions"),
url(r'^promotions/(?P<title>[-\w]+)/$', views.promotion_detail, name="promotions_detail"),
promotion.html
{% for promotion in promotions %}
<div class="a-promotion">
<div class="column-1">
<div class="title">{{promotion.title}}</div>
<div class="offer">{{promotion.amount}}</div>
</div>
<div class="column-2">
**********THE LINE BELOW THROWS THE ERROR******************
{{promotion.short_description}}... <a href="{% url 'promotions_detail' title=promotion.title %}"><span class="learn-more">Learn More</span></a>
</div>
</div>
{% endfor %}
Error: NoReverseMatch at /promotions/
Reverse for 'promotions_detail' with arguments '()' and keyword arguments '{u'title': u'Welcome to Our Site'}' not found. 1 pattern(s) tried: ['promotions/(?P<title>[-\\w]+)/$']