Hi all,
Currently I have a setup whereby a user navigating to a product
category is met with the list of products in that category using
generic views. In urls.py I have the 'info_dicts' handling the
categories so that in the generic view the correct category is
presented to user.
That all works fine but I'd like to include information like the
category title and description so I changed urls.py to:
ammonite_dict = {
'queryset': Product.objects.filter(categories=1),
'extra_context': { 'filter' : 'ammonite' },
'allow_empty': 'true',
}
and in the generic list view I have:
{% ifequal filter "ammonite" %}<h1>Ammonite collection</h1>{%
endifequal %}, etc etc for each category.
Simply put this does not work and whilst its ok to try this to pass a
category title its not an elegant solution to pass any other
additional information I want about a category.
I wonder is there a simple fix to my code or even a way to handle
multiple query sets so that the list template can output the correct
heading and description.
Any help would be appreciated,
Many Thanks
Allan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---