Wishlist context

4 views
Skip to first unread message

Olivier Lauret

unread,
Mar 29, 2012, 5:08:26 AM3/29/12
to satchm...@googlegroups.com
Hello,

Apologies for the beginner's question. I'm trying to show the number of items in the wishlist everywhere on my website, the same way I would have the number of items in the shopping cart.

I have created a custom tag for it. The problem is that the wishlist context isn't everywhere and I don't think it's a good idea to set it manually for every page. Is there a way I could add it to efficiently to every page?

I tried to googled it but nothing was very obvious.

Regards,
Olivier

lifewithryan

unread,
Mar 29, 2012, 9:32:06 AM3/29/12
to satchm...@googlegroups.com
Perhaps a context processor?  Checks Django's docs for writing your own.  Pretty easy.

Sent from my iPod
--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.

Chris Moffitt

unread,
Mar 29, 2012, 10:05:21 AM3/29/12
to satchm...@googlegroups.com
You can use a context processor or create a custom template tag.

-Chris

lacry...@gmail.com

unread,
Mar 29, 2012, 10:34:12 AM3/29/12
to satchm...@googlegroups.com

Look for "context processor" in the django docs

-----Mensaje original-----
De: Olivier Lauret
Enviados: 29/03/2012 06:08:26
Asunto: Wishlist context

Olivier Lauret

unread,
Mar 29, 2012, 11:42:16 AM3/29/12
to satchm...@googlegroups.com
Thank you everyone, I will have a look at it.

Olivier
Reply all
Reply to author
Forward
0 new messages