On Jun 29, 12:59 pm, dystopia <[EMAIL PROTECTED]> wrote: > [snip]... Would I > then have have to implement the functionality of this in every view by > calling an cartSummary method and pushing that out into the template? > Or is it better to somehow compile all this functionality into a > template tag itself - if that's possible? > > Any ideas appreciated, > > James
I've taken the latter approach in my projects. Something like: {% load cart_tags %} {% get_cart as cart %} {% for items in cart %} ... {% endfor %} Then, you might put that code somewhere higher up in the template hierarchy: {% block shopping_cart %} <snip from above> {% endblock %} or you might include it as a template: {% include "shopping_cart.snippet..html" %} Whatever you do, I would recommend taking the approach of loading the shopping cart a tag. That's my opinion, anyway. doug. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---