Ok, It is solved.

for those interested I did so:

(mysite/urls.py)

urlpatterns += patterns('mysite.views',
    (r'^news/(?P<cat_slug>\w+)/$', 'news_category', {})
)

(mysite/views.py)

from mysite.news.models import New, NewCategory
from django.views.generic.list_detail import object_list

def news_category(request, cat_slug=None):
        news_list =
New.objects.filter(category__slug=cat_slug).exclude(is_active=False).order_by('pub_date')
        return object_list(
                request,
                queryset = news_list,
                template_name = 'news.html'
        )

Hope it'll help somehow

On Sep 24, 1:51 am, aleray <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying capture urls patterns with generic views, something like
> this:
>
> info_dict = {
>     'queryset':
> New.objects.filter(category__slug=cat_slug).exclude(is_active=False).order_by('pub_date'),
>     'template_name': 'news.html',
>     'paginate_by': 1,
>
> }
>
> urlpatterns += patterns('django.views.generic.list_detail',
>     (r'^news/(?P<cat_slug>\w+)/$', 'object_list', info_dict),
> )
>
> However, this is not working. Is there a solution?
>
> 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