I am following a book (Practical Django Projects 2nd Ed.), and I have run across an error that I cannot figure out.
I get this error: TemplateSyntaxError at /weblog/
Caught NoReverseMatch while rendering: Reverse for 'coltrane_category_list' with arguments '()' and keyword arguments '{}' not found.
Here is the code in my template that uses {% url %}:
<li id="main-nav-entries">
<a href="{% url coltrane_entry_archive_index %}">Entries</a>
</li>
Here is my URL configuration:
entry_info_dict = {
'queryset': Entry.objects.all(),
'date_field': 'pub_date',
}
urlpatterns = patterns('django.views.generic.date_based',
(r'^$', 'archive_index', entry_info_dict, 'coltrane_entry_archive_index'),
(r'^(?P<year>\d{4})/$', 'archive_year', entry_info_dict, 'coltrane_entry_archive_year'),
(r'^(?P<year>\d{4})/(?P<month>\w{3})/$', 'archive_month', entry_info_dict, 'coltrane_entry_archive_month'),
(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/$', 'archive_day', entry_info_dict, 'coltrane_entry_archive_day'),
(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$', 'object_detail', entry_info_dict, 'coltrane_entry_detail'),
)
What does the error mean? Am I not giving it enough arguments? How does the {% url %} work? From my understanding, it will look at the URL configuration and find the matching keywords and give back a URL based on the matching keyword in the URL configuration.