Hey,

inside a inclusion tag I try to set a variable to the context. But in  
no template it is accessible.
I followed http://www.djangoproject.com/documentation/ 
templates_python/#setting-a-variable-in-the-context
If I print the context in [1], level is defined, but if I use {%  
debug %}  not

@register.inclusion_tag('snippets/ 
new_navigation.html',takes_context=True)
def navigation(context,o=None):

     [snip]

     for i in l1:
         if i[1]==category or i[1] in category.get_p_list():
             i[0]=True
             top=l1.index(i)

     context['level']=top+1
     print context #  [1]
     return {'L1':l1,
             'L2':l2,
             'cat':category,

     }

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