Sunday, February 19, 2012

Division within django templates

Hi there,

i'm currently using the widthratio tag for division within a django template as detailed here: http://slacy.com/blog/2010/07/using-djangos-widthratio-template-tag-for-multiplication-division/. However, it only returns integer values. Is there something equally smart I can use to return floats, as some of the numbers I am calculating are < 1 and 0 gets returned...

Cheers,
J

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/GGL4EeyWFQsJ.
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate