I got it error was i was trying to check to two different data types one was an integer and other was a string like 1 and '1' On Dec 9, 8:34 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Dec 9, 2:18 pm, Biju Varghese <bijukava...@gmail.com> wrote: > > > <select name="jobspec" id="jobspec"> > > {%for jobsp in jobspecs%} > > {%ifequal jobsp.id jobtitle.jobspec_id %} > > <option>{{jobsp.id}}</option> > > {%endifequal%} > > {%endfor%} > > <option>-select-</option> > > {%for jobspec in jobspecs%} > > <option > > value="{{jobspec.id}}">{{jobspec.jobspec_name}}</option> > > {%endfor%} > > </select> > > > I am trying to nest ifequal with for loop .my problem is i am not able > > to get value of (jobsp.id) ie value of jobsp is not available in the > > ifequal block is there any other way to do this.. > > Why is it not available in the ifequal tag? It should be. Have you > checked that it actually has a value? > > You should also consider doing this whole thing using the forms > framework, which will output select fields for you. > -- > 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-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.