I changed to your suggestion and I get an error it can't find the word 'description' No matter what I try , I can put the word in quotes and it prints out the appropiate times . When I run ipython ev=db(db.events.person==db.person.id).select ('person','description') then print ev I get the values of the description The code I have looks similar to the examples I see. Any suggestions???? Thanks Jim
On Sep 28, 12:10 pm, "mr.freeze" <nat...@freezable.com> wrote: > I think you need to change this: > {{for events in events:}} > ... > <td>{{=description}}</td> > > ...to this...: > {{for event in events:}} > ... > <td>{{=event.description}}</td> > > On Sep 28, 12:46 pm, jayvandal <jayvan...@gmail.com> wrote: > > > Hi again > > I can't understand why I can't(two can't) display a field in my > > project. When I run the controller statements in ipython and I print > > the results I can see the data in the description field. Yet in my > > view code I get an error., description > > Here is the code. > > Any help is appreciated > > ====================================================== > > def person_events(): > > pep=db(db.person.id> 0).select(orderby=db.person.id) > > form=SQLFORM(db.events,fields=['end_date']) > > events=db(db.events.person==db.person.id).select > > ('person','description') > > return dict(pep=pep,events=events,form=form) > > > ======================================================== > > {{extend 'layout.html'}} > > > <h2>Person and Events:</h2> > > > {{=form}} > > > {{for person in pep:}} > > [{{=A(person.last_name,_href=URL(r=request,f='person/ > > %s'%person.id))}}] > > > <br/><br/> > > <h1>Featured Events</h1> > > <p><center><table width="80%"> > > {{if len(events):}} > > > {{for events in events:}} > > <tr> > > > <td>{{=description}}</td> > > > </tr> > > {{pass}} > > {{else:}} > > <h2> no events</h2> > > > {{pass}} > > > {{pass}} > > </table></center></p><br/><br/> > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---