On Nov 18, 7:55 pm, jago <[EMAIL PROTECTED]> wrote:
> I am thinking about something like {{  (width - 5) *12  }}  ?

No. You can add or subtract using the 'add' filter:
{{ width:add:"-5" }}
but anything else will require a custom template tag or filter.
Luckily, these are extremely easy to write:

@register.filter
def multiply(value, arg}
    return int(value) * int(arg)

{{ width|multiply:12 }}

You'll want to add error checking and so on of course, but that's the
idea.

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