I think you need one more {{pass}} at the end for the {{if event:}}
On Sep 22, 6:13 pm, jayvandal <[email protected]> wrote:
> Hi,
> back once again and trying to show master file and all the details
> (certain fields)
> This is my controller and the corresponding view.
> I want to show the description field in the events table(file)
> I am researchin the manual and examples but I don't seem to have a
> clear understanding of the controller.
> Any help will bemuch appreciated
> Thanks
> Jim
> =======================================
> def person_events():
> pep=db(db.person.id> 0).select(orderby=db.person.id)
> event=db(db.events.person==db.person.id)\
> .select(orderby=db.person.last_name,orderby=db.person.id)
> form= SQLFORM(db.events,fields=['description'])
> return dict(pep=pep,event=event, form=form)
> ===================================================================
> {{extend 'layout.html'}}
>
> <h2>Person and Events:</h2>
> <h2>
> {{for person in pep:}}
> [{{=A(person.last_name,_href=URL(r=request,f='person/
> %s'%person.id))}}]
> {{pass}}
> </h2><br/><br/>
> {{if event:}}
> <h1>Featured Events</h1>
> <p><center><table width="80%">
> {{for person in event:}}
> <tr>
> <td>{{=A(event.description,href=URL(r=request,f='show?id=
> %s'%event.id))}}</td>
> </tr>
> {{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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---