Message info
 
To:django-users@googlegroups.com From:Bill Freeman Subject:Re: Division within django templates Date:Sun, 19 Feb 2012 15:21:44 -0500
 

Yes. Use a model method. Don't do serious calculation in templates.

On Sun, Feb 19, 2012 at 11:03 AM, Jason <1jason.whatford@gmail.com> wrote:
> Hi there,
>
> i'm currently using thewidthratio 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.

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