Re: HELP - Django variable in style (width) attribute

2016-10-20 Thread Aline C. R. Souza
Thank you both, Constantine and James. Thanks to your comments I could realize where the error was, and I could improvve performance assigning the returned value to a variable. The error was in html, and not django. When I looked at the rendered html, I could see the error. Em sábado, 15 de ou

Re: HELP - Django variable in style (width) attribute

2016-10-15 Thread Constantine Covtushenko
Hi Aline, It is not direct answer for what you are asking, but why do you calculate the percentage 2 times? Why just use `with ` tag? With it nor problem at all. Hope that helps. Regards, Constantine C. On Sun, Oct 16, 2016

Re: HELP - Django variable in style (width) attribute

2016-10-15 Thread James Schneider
> Why the template tag call {% get_percentage question.pk choice.pk %} works inside the span tag, but doesn't work in style (width) attribute? > > What is wrong? > No idea. You haven't provided what your template tag does, or what the rendered template looks like. What does the final HTML look li