Skip to content

Commit

Permalink
Merge pull request #940 from nicozanf/master
Browse files Browse the repository at this point in the history
DOCS: deprecate DAL widgets and clarify grid.action
  • Loading branch information
nicozanf authored Nov 5, 2024
2 parents adc34b6 + fbb89b1 commit 1246cc0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/chapter-07.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,11 @@ only for fields of type “string”. ``uploadfield``, ``authorize``, and
- ``authorize`` can be used to require access control on the
corresponding field, for “upload” fields only. It will be discussed
more in detail in the context of Authentication and Authorization.
- ``widget`` do not use DAL widgets with py4web, it has has its own
(see :ref:`Widgets` later).
- ``represent`` can be None or can point to a function that takes a
field value and returns an alternate representation for the field
value. Examples:
value.

Note not all the attributes are thread safe and most of them
should only be set globally for an app. The following are guaranteed to be
Expand Down
5 changes: 5 additions & 0 deletions docs/chapter-12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ dropdown menu!

Using widgets in forms is quite easy, and they'll let you have more control on its pieces.

.. important::

When using py4web, use py4web widgets, and do not use the pydal widget argument in the Field object
(see :ref:`Field constructor`).

Custom widgets
~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/chapter-14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ the grid or a form. Use the following to decide:

::

[[if request.query.get('action') in ('details', 'edit'):]]
[[if grid.action in ['details', 'edit']: ]]
# Display the custom form
[[form = grid.render() ]]
[[form.custom["begin"] ]]
Expand Down

0 comments on commit 1246cc0

Please sign in to comment.