Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. def inventory():
  2. query = db.inventory
  3.  
  4. # List of additional links.
  5. links = []
  6. links.append(
  7. dict(header = "Optional",
  8. body = lambda row : star(row)
  9. )
  10. )
  11. # db.inventory.inventory_starred.readable = False
  12. # Grid definition.
  13. grid = SQLFORM.grid(
  14. query,
  15. field_id = db.inventory.id, # Useful, not mandatory.
  16. fields = [db.inventory.inventory_name, db.inventory.inventory_starred],
  17. links = links,
  18. # And now some generic defaults.
  19. details=False,
  20. create=True, editable=False, deletable=False,
  21. csv=True,
  22. user_signature=True, # We don't need it as one cannot take actions directly from the form.
  23. )
  24. return dict(grid=grid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement