NoReverseMatch at /rango/ newbie got stuck in tango w django tutorial
Question: The error message debug mode:

> NoReverseMatch at /rango/ Reverse for 'category' with arguments '('other-
> frameworks',)' and keyword arguments '{}' not found. 1 pattern(s) tried:
> ['rango/category/(?P\w+)/$'] Request Method: GET Request URL:
> <http://127.0.0.1:8000/rango/> Django Version: 1.7.4 Exception Type:
> NoReverseMatch Exception Value: Reverse for 'category' with arguments
> '('other-frameworks',)' and keyword arguments '{}' not found. 1 pattern(s)
> tried: ['rango/category/(?P\w+)/$'] Exception Location:
> C:\Users\Beheerder\Desktop\venv\lib\site-
> packages\django\core\urlresolvers.py in _reverse_with_prefix, line 468
> Python Executable: C:\Users\Beheerder\Desktop\venv\Scripts\python.exe Python
> Version: 3.4.2

Error during template rendering

> Reverse for 'category' with arguments '('other-frameworks',)' and keyword
> arguments '{}' not found. 1 pattern(s) tried: ['rango/category/(?P\w+)/$']
    
    
    1   {% if cats %}
    2       <ul class="nav nav-sidebar">
    3       {% for c in cats %}
    4           <li><a href="{% url 'category'  c.slug %}">{{ c.name }}</a></li>
    5       {% endfor %}
    6   
    7   {% else %}
    8       <li> <strong >There are no category present.</strong></li>
    9   
    10      </ul>
    11  {% endif %}
    

I ( as a newbie ) have no idea what is going wrong here,

This is the link to the specific tutorial part:
<http://www.tangowithdjango.com/book17/chapters>

    
    
    from django.conf.urls import patterns, url
    from rango import views
    
        urlpatterns = patterns('',
            url(r'^$', views.index, name='index'),
            url(r'^about/$', views.about, name='about'),
            url(r'^category/(?P<category_name_url>\w+)/$', views.category, name='category'),
            url(r'^add_category/$', views.add_category, name='add_category'),
            url(r'^category/(?P<category_name_slug>\w+)/add_page/$', views.add_page, name='add_page'),
            url(r'^restricted/$', views.restricted, name='restricted'),
            url(r'^add_page/$', views.add_page, name="add_page"),
            )
    


Answer: The `-` dash in the `other-frameworks` string does not match the (alphanumeric
and underscore) `\w`.

Change the regex in the url to the `[\w-]+`:

    
    
    url(r'^category/(?P<category_name_url>[\w-]+)/$', views.category,
                                                      name='category'),
    

