Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/chapter-12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docs/chapter-13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions docs/chapter-14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://fontawesome.com/>`__ icon font CSS to use this.
to add `fontawesome <https://fontawesome.com/>`__ 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 <https://icons.getbootstrap.com/#install>`__
to your html templates to use this.
`Bootstrap Icons <https://icons.getbootstrap.com/#install>`__
to your html templates to use this.

Custom Action Buttons
---------------------
Expand Down
Loading