I believe I've used a custom filter similar to this:

@register.filter
def product_attr(product, attr):
    """
    Return the value of the specified product attribute as defined via a
custom Attribute.
    Example:

    """
    try:
        return product.translated_attributes().get(option__name=attr).value
    except:
        return None


-Chris

On Tue, Aug 31, 2010 at 7:19 AM, Brian Lee <[email protected]> wrote:

> Thanks for the suggestion, but it did not work
>
> On Aug 30, 10:42 pm, Stuart Laughlin <[email protected]> wrote:
> > Did you try {{ product.translated_attributes.dimension.value }} ? Cannot
> try
> > it right now but seems like it might work.
> >
> > On Aug 29, 2010 10:45 PM, "Brian Lee" <[email protected]> wrote:
> >
> > Is there anyway to just get an individual product attribute on the
> > product detail page?
> >
> > For example, I know the below code will cycle through all of the
> > attributes,
> > {% for att in product.translated_attributes %}
> > {{ att.description }}: {{ att.value }}<br/>
> > {% endfor %}
> >
> > But what if I just wanted to call an attribute called dimension. How
> > would you call that?
> >
> > Thank you
> >
> > --
> > 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]<satchmo-users%[email protected]>
> <satchmo-users%2bunsubscr...@goog legroups.com>
> > .
> > For more options, visit this group athttp://
> groups.google.com/group/satchmo-users?hl=en.
>
> --
> 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]<satchmo-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/satchmo-users?hl=en.
>
>

-- 
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