> Hi all
>
> i have a custom template tag that takes some argument and calculates the
> result.
> I want to compare that value obtained from that custom tag with another
> variable.
>
> Custom template tag
> {% price_for_pax service pax '' %}
>
> variable :
>
> {{service.price}}
>
> What i want is {% if service.price == price_for_pax service pax ' ' %}
> do something
> {% endif %}
>
> When i look for the result it does not show anything
> Can i compare like this ? If not what can be the solution ?
>
> Thanks in advance
>
The manual has a section on this:
https://docs.djangoproject.com/en/1.4//howto/custom-template-tags/#setting-a-variable-in-the-context
Cheers
Tom
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment