Here are the tags:

@register.inclusion_tag('shop/new_arrivals.html')
def show_new_arrivals(number):
    new_arrivals = Product.objects.all().order_by('date_added')[:number]
    return {'new_arrivals': new_arrivals}

@register.inclusion_tag('shop/featured_items.html')
def show_featured_items(number):
    featured_items = Product.objects.filter(featured=True)[:number]
    return {'featured_items': featured_items}

the tags render from a template so you would need to provide the appropriate
templates based on how you want to display the items
My first attempt at writing templatetags, so please be kind

On Wed, Aug 25, 2010 at 7:51 PM, Alessandro Ronchi <
[email protected]> wrote:

>
>
> 2010/8/25 Aziz Bookwala <[email protected]>
>
> @alessandro: where is the satchmo code hosted, where can i submit my tags?
>>
>
> http://bitbucket.org/chris1610/satchmo/wiki/Home
>
> --
> Alessandro Ronchi
> http://www.soasi.com
>
> Hobby & Giochi
> http://hobbygiochi.com
> http://www.facebook.com/hobbygiochi
>
> --
> 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.
>



-- 
- Aziz M. Bookwala

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