Wednesday, July 3, 2013

Re: can we pass objects in template tags

On Tue, Jul 2, 2013 at 11:24 PM, surya <kasturisurya@gmail.com> wrote:
> I would like to pass object into template tag, then process it.. Is it
> possible
>
> def my_tag(parser, token):
> return Node()
>
> The token object seems to be a string!! but how to get some objects??
>

https://docs.djangoproject.com/en/1.5/howto/custom-template-tags/#passing-template-variables-to-the-tag

Docs
-> "The Template Layer"
-> "Custom template tags and filters"
-> "Passing template variables to the tag"

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate