Hi, 
 I am creating a basic app that allows users to view item in an inventory. 
They are able to see the item list by using the sqlform.grid. Because some 
fields in the database are private and I do not want the viewer to see it, 
I am unable to use the default details page. Because of this, I need to 
set  "details=False" on my grid, and then create a new details.html view, 
and add the following "links" code to my grid:

    query = ((db.equipment.isActive=="True"))
    fields = [db.equipment.id, db.equipment.category, db.equipment.title, 
db.equipment.price]
*    links = [lambda row: A('Details',_href=URL("default","details", 
args=[row.id]))]*
    grid = SQLFORM.grid(query=query, 
        fields=fields,
        editable=False,
        deletable=False,
        create=False,
        user_signature=True,
        details=False,
        links=links
        )


So here is my question. What do I use in the details.html view and 
controller in order to pick and choose what information I want to use? I am 
sure this is a basic question, and so far I have been following the 
tutorial / book, but  I cannot seem to find the page in the tutorial, can 
anyone point me to the right direction or show me some example code?

I only want the "title", "price", "photo", "description" and maybe "date" 
to show in the details.html, and not ALL of the fields in the DB (contains 
private information)

Thank you

-- 



Reply via email to