On Wed, Feb 24, 2010 at 12:43 PM, Mrainess <[email protected]> wrote:

> Hi,
>
> I want the list of displayed products to optionally be what matches on
> two or more categories.
>
> That's extremely easy.
>
> qry =
>
> Product.objects.filter(category=103).filter(category=216).filter(category=312)
> (and so forth)
>
> But what's the best way to do this in the templates?
>
> I assume I will need a custom template-tag.
>
>
If you need this functionality to be generically provided throughout the
site, then yes, a template tag is a good idea.

If it is just some sort of filtering process on a "search-type" page, then I
think it would be far easier to do (and debug) this with a form/view setup.
 Template tags get kind of hairy to debug, while views are pretty
straightforward.

-- 
Bruce Kroeze
http://www.ecomsmith.com
It's time to hammer your site into shape.

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo 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/satchmo-users?hl=en.

Reply via email to