Hi,

I'm baking a small kind of blog, and I'm trying now to generate a menu
for the catgories. I'm using the same view for the main page, and the
category pages :

    (r'^news/$', 'news', {}, 'news-all'),
    (r'^news/category/(?P<cat_slug>\w+)/$', 'news', {}, 'news-cat'),

If I enter the url its works (eg. http://localhost/news/ and
http://localhost/news/category/general/).
In my templates, I can do this:

        <a href="{% url news-all %}">all</a><br />
        <a href="{% url news-cat 123 %}">categorie</a>

This last line is unuseful for my project because I want to use slugs
instead of id's, so I try :

        <a href="{% url news-cat general %}">categorie</a>

And then I get an error :

NoReverseMatch: Reverse for 'www.news-cat' with arguments '('',)' and
keyword arguments '{}' not found.

What is wrong ?

Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to