laundmo
unread,Dec 9, 2025, 7:54:07 AM (7 days ago) Dec 9Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to py4web
the Grid paramters details, editable, and deletable are used for 2 distinct purposes in an incompatible manner:
- To determine whether the row has a details/edite/delete button. In this case, they can be a boolean or a callable that takes the row and returns a boolean.
- To change the details/edit/delete button URL, in this case it needs to be a str.
I cannot at the same time determine whether a row should have the details/edit/delete button and also change the URL they point at, because i cant have a callable thats also a str. I have to choose either option.
Possible solutions:
- the simplest: the callable can return the URL as well, which will be used for the button. This works because theres no need to provide a URL if the button isn't rendered for this row.
- slightly more complex: split the params into one for checking whether the buttons should be rendered, and a second for generating the button url