Hi I use Django 1.0 and I define a template function like... --- from django import template register = template.Library() def doSomething(param1, param2): # Do something like... return str(param1)+'<br/>'+str(param2) register.simple_tag(doSomething) --- to use that in template system, assuming a and b are in context... --- {% doSomething a b %} <!-- This call outputs: valueOfA valueOfB --> --- Hope it helps you out ;)
On Aug 31, 12:31 pm, Bobby Roberts <tchend...@gmail.com> wrote: > hi group. I"ve got an issue i'm needing help with. I have two > variables, a and b in my template and I need to pass those to a single > template tag so I can process them and return a result to the > template. Is there a way to pass more than one variable to a template > tag... if so, how? > > thanks in advance, --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---