Skip to content

Commit 1e77c1f

Browse files
committed
rearrange doc
so big work~
1 parent 1f0fe2f commit 1e77c1f

File tree

27 files changed

+3754
-2867
lines changed

27 files changed

+3754
-2867
lines changed

docs/FAQ.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@ You can consider the :doc:`pin <./pin>` module. It achieves persistent input by
1313
How to output an input widget such as a search bar?
1414
----------------------------------------------------------
1515

16-
Unfortunately, PyWebIO does not support outputting input widget to the page as general output widget.
17-
Because this will make the input asynchronous, which is exactly what PyWebIO strives to avoid. Callbacks will increase the complexity of application development. PyWebIO does not recommend relying too much on the callback mechanism, so it only provides a little support.
18-
However, there is a compromise way to achieve similar behavior: just put a button (`put_buttons() <pywebio.output.put_buttons>`) where the input widget needs to be displayed, and in the button's callback function, you can call the input function to get input and perform subsequent operations.
16+
You can consider the :doc:`pin <./pin>` module.
1917

2018

2119
Why the callback of ``put_buttons()`` does not work?
2220
----------------------------------------------------------
2321

24-
In general, in Server mode, once the task function returns (or in Script mode, the script exits), the session closes. After this, the event callback will not work. You can call the `pywebio.session.hold()` function at the end of the task function (or script) to hold the session, so that the event callback will always be available before the browser page is closed by user.
25-
22+
You might use the old version of PyWebIO, upgrade it to the latest version or see `the old document <https://pywebio.readthedocs.io/en/v1.3.3/FAQ.html>`_
2623

2724
Why I cannot download the file using ``put_file()``?
2825
----------------------------------------------------------
2926

30-
The reason is the same as above. The page needs to request server for data when the download button is clicked, so the download link will be unavailable after the session is closed. You can use the `pywebio.session.hold()` function at the end of the task function to hold the session.
27+
The reason is the same as above.

0 commit comments

Comments
 (0)