Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def inventory():
- query = db.inventory
- # List of additional links.
- links = []
- links.append(
- dict(header = "Optional",
- body = lambda row : star(row)
- )
- )
- # db.inventory.inventory_starred.readable = False
- # Grid definition.
- grid = SQLFORM.grid(
- query,
- field_id = db.inventory.id, # Useful, not mandatory.
- fields = [db.inventory.inventory_name, db.inventory.inventory_starred],
- links = links,
- # And now some generic defaults.
- details=False,
- create=True, editable=False, deletable=False,
- csv=True,
- user_signature=True, # We don't need it as one cannot take actions directly from the form.
- )
- return dict(grid=grid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement