From 47f81e9604d1a458892ac92a87732037362d969e Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Sat, 21 Jun 2025 11:12:59 +0200 Subject: [PATCH] DOCS: simple indentation fixes --- docs/chapter-12.rst | 2 +- docs/chapter-13.rst | 4 ++++ docs/chapter-14.rst | 9 +++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/chapter-12.rst b/docs/chapter-12.rst index dc0407507..4700df8d6 100644 --- a/docs/chapter-12.rst +++ b/docs/chapter-12.rst @@ -359,7 +359,7 @@ Using widgets in forms is quite easy, and they'll let you have more control on i Custom widgets ~~~~~~~~~~~~~~ -You can also customize the widgets properties by cloning an modifying and existing style. +You can also customize the widgets properties by cloning and modifying and existing style. Let's have a quick look, improving again our Superhero example: .. code:: python diff --git a/docs/chapter-13.rst b/docs/chapter-13.rst index 44fca5cbb..49607ca05 100644 --- a/docs/chapter-13.rst +++ b/docs/chapter-13.rst @@ -454,17 +454,20 @@ two practical plugins that are sufficient in most cases. The two plugins are cal SimpleTokenPlugin and JwtTokenPlugin. The first one of the two is recommended in most of the cases. What all plugins have in common: + - They have a way for a user to create a token which is a string. - When an HTTP(S) request is made to an action that @actiion.uses(auth) or @action.uses(auth.user) py4web will identify the user if the token is present, as if the user was logged-in. What SimpleTokenPlugin and JwtTokenPlugin have in common: + - When an HTTP(S) request is made, the token must be put in the "Authentication" header. You will need to create your own plugin if you want to pass it in some other manner. - Each user can create as many tokens as desired. - Users can create tokens for other users if the application logic requires/allows it. Unique features of SimpleTokenPlugin: + - A token is a UUID. - Tokens can be managed serverside (created, deleted, expired, change expiration). - Current tokens are stored in a adatabase table. @@ -475,6 +478,7 @@ Unique features of SimpleTokenPlugin: - Under the hood veryfing a token requires a database query. Unique features of JwtTokenPlugin: + - The token is an encrypted and digitally signed dict that stores the user_id and expiration. - The author of the token can add any metadata to into the token at creation. - The token is not stored anywhere serverside and there is no database table. diff --git a/docs/chapter-14.rst b/docs/chapter-14.rst index 553025ea8..37b75a2fc 100644 --- a/docs/chapter-14.rst +++ b/docs/chapter-14.rst @@ -404,13 +404,14 @@ You can even build your own class_style to be used with the css framework of your choice. With icon_style, you can customize the icon font used. Currently, the following exist: + - ``IconStyleFontawsome`` is the current default (for backwards compatibility). You need - to add `fontawesome `__ icon font CSS to use this. + to add `fontawesome `__ icon font CSS to use this. - ``IconStyle`` which doesn't correspond to any font or icon set. It inserts simple - css classes like ``icon-edit-button`` which you can write your own css for. + css classes like ``icon-edit-button`` which you can write your own css for. - ``IconStyleBootstrapIcons`` You need to add the icon font CSS from - `Bootstrap Icons `__ - to your html templates to use this. + `Bootstrap Icons `__ + to your html templates to use this. Custom Action Buttons ---------------------