Hi Eugene,

On 12/21/06, Eugene Pyvovarov <[EMAIL PROTECTED]> wrote:

Look, I have a little problem. I need to put on the page shopping cart
icon and quantity of elements in  cart. I make custom inclusion tag.
But now I have a problem - I can not access request object with session
data(I store quantity in user's session).
How can i do this thing?
Thanks


You need to pass a RequestContext from your views to your template,
take a look at this:

http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext

Your inclusion tag will also need a second parameter called
'takes_context' set to True, ie:

mytag = register.inclusion_tag('template.html', takes_context=True)(mytag)

See:
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext/

Regards,
Jorge

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

Reply via email to