Re: forloop breaking

2013-06-27 Thread abhijeet shete
Hi, You can achieve this by using javascript or jquery. Just check this example : http://jsfiddle.net/pxbW9/ I want to remove the static heading of a table in django templates in > which the data is coming form database which is dynamic so I want if > there is no entry in that column it shou

Re: forloop breaking

2013-06-27 Thread Harjot Mann
On Thu, Jun 27, 2013 at 11:40 AM, yati sagade wrote: > I doubt she has a problem with the Python for-loop. She is trying to achieve > similar control flow in the Django templating language's for loop. I want to remove the static heading of a table in django templates in which the data is coming

Re: forloop breaking

2013-06-26 Thread yati sagade
I doubt she has a problem with the Python for-loop. She is trying to achieve similar control flow in the Django templating language's for loop. On Thu, Jun 27, 2013 at 10:33 AM, Gladson SimplĂ­cio Brito < gladsonbr...@gmail.com> wrote: > > http://docs.python.org/2/tutorial/controlflow.html#break-

Re: forloop breaking

2013-06-26 Thread Gladson SimplĂ­cio Brito
http://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops 2013/6/27 vijay shanker > You are looking for "break" > > On Wednesday, June 26, 2013 8:39:58 PM UTC+5:30, Harjot Mann wrote: >> >> What are the methods to break forloop? >> > -- > You re

Re: forloop breaking

2013-06-26 Thread vijay shanker
You are looking for "break" On Wednesday, June 26, 2013 8:39:58 PM UTC+5:30, Harjot Mann wrote: > > What are the methods to break forloop? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Re: forloop breaking

2013-06-26 Thread yati sagade
The best thing I can think of is to send from the view a set/list of available attributes such that there is at least one item with a non empty value for those attributes. This can be achieved by a single iteration on the iterable `st'. Then in the template, you can just check if, for example Descr

Re: forloop breaking

2013-06-26 Thread Harjot Mann
Actually I want to remove the heading of my table in templates if it is not filled. I have done this using this coding: {% for test in st|slice:":1" %}S.No {% ifnotequal test.Description "" %} Description{% endifnotequal %} {% ifnotequal test.Thickness "" %}Thickness{% endifnotequal %}

Re: forloop breaking

2013-06-26 Thread Jonathan Baker
Here is a link to the Python control flow tools section on 'break': http://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops On Wed, Jun 26, 2013 at 9:28 AM, Goran wrote: > You can always use IF > for foo in bar: > if foo == 1: >

Re: forloop breaking

2013-06-26 Thread Goran
You can always use IF for foo in bar: if foo == 1: do something even redirect else: foo On Wednesday, June 26, 2013 5:09:58 PM UTC+2, Harjot Mann wrote: > > What are the methods to break forloop? > -- You received this message because you are subscribe

forloop breaking

2013-06-26 Thread Harjot Mann
What are the methods to break forloop? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send ema