Skip to content

Commit eeadd81

Browse files
committed
Fixed lots of typos, thanks Claude
1 parent 07a4913 commit eeadd81

14 files changed

Lines changed: 70 additions & 71 deletions

docs/chapter-01.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ details if you come from web2py):
9494
- PY4WEB leverages PyDAL's new tags functionality
9595
to tag users with groups, search users by groups, and
9696
apply permissions based on membership.
97-
- PY4WEB comes with with some custom Vue.js components designed to
97+
- PY4WEB comes with some custom Vue.js components designed to
9898
interact with the PyDAL RESTAPI, and with PY4WEB in general. These
9999
APIs are designed to allow the server to set policies about which
100100
operations a client is allowed to perform, but give the client

docs/chapter-02.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Help, resources and hints
33
=========================
44

5-
We've made our best to make PY4WEB simple and clean. But you know, modern web programming is a daunting task. It requires an open mind, able to
5+
We've done our best to make PY4WEB simple and clean. But you know, modern web programming is a daunting task. It requires an open mind, able to
66
jump frequently (without being lost!) from python to HTML to javascript to css and even database management.
77
But don't be scared, in this manual we'll assist you side by side in this journey. And there are many other valuable resources that we're going to show
88
you.
@@ -15,7 +15,7 @@ This manual
1515
-----------
1616

1717
This manual is the Reference Manual for py4web. It's available online at https://py4web.com/_documentation/static/index.html, where you'll also find the
18-
PDF and EBOOK version, in multiple languages. It written in RestructuredText and generated using Sphinx.
18+
PDF and EBOOK version, in multiple languages. It is written in RestructuredText and generated using Sphinx.
1919

2020

2121
The Google group
@@ -45,7 +45,7 @@ There are many tutorials and videos available. Here are some of them:
4545
- the `South Breeze Enterprises demo app <https://github.com/jpsteil/southbreeze>`__ by `Jim Steil <https://github.com/jpsteil>`__. It is built around
4646
the structure of the Microsoft Northwind database,
4747
but converted to SQLite. You can view the final result online `here <https://southbreeze.pythonbench.com>`__
48-
- the `py4web blog in spanish <https://py4web-tutoriales.blogspot.com>`__ by Alan Etkin, wich covers the basics to start with the framework plus examples. It is thought as a resource for sudents and aims to provide a full web development course
48+
- the `py4web blog in spanish <https://py4web-tutoriales.blogspot.com>`__ by Alan Etkin, which covers the basics to start with the framework plus examples. It is intended as a resource for students and aims to provide a full web development course
4949

5050
The sources on GitHub
5151
---------------------
@@ -83,7 +83,7 @@ we also suggest to:
8383
introduction). In a complex workplace this will avoid to be messed up
8484
with other python programs and modules
8585
- use **git** to keep track of your program's changes and save
86-
your changes in a safe place online (GitHub, GitLat, or Bitbucket).
86+
your changes in a safe place online (GitHub, GitLab, or Bitbucket).
8787
- use an editor with Syntax Highlighting. We highly recommend
8888
Visual Studio Code (VScode) or PyCharm.
8989

@@ -132,7 +132,7 @@ In PyCharm, if you should get gevent errors you need to enable Settings | Build,
132132
How to contribute
133133
=================
134134

135-
We need help from everyone: support our efforts! You can just participate in the Google group trying to answer other's questions, submit bugs using or
135+
We need help from everyone: support our efforts! You can just participate in the Google group trying to answer others' questions, submit bugs or
136136
create pull requests on the GitHub repository.
137137

138138
If you wish to correct and expand this manual, or even translate it in a new foreign language, you can read all the needed information directly on

docs/chapter-03.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Understanding the design
66
------------------------
77

88
Before everything else it is important to understand that unlike other web frameworks,
9-
is not only a python module that can be imported by apps. It is also a program that
9+
py4web is not only a python module that can be imported by apps. It is also a program that
1010
is in charge of starting some apps. For this reason you need two things:
1111

1212
- The py4web module (which you download from our web site, from pypi or from github)
@@ -142,7 +142,7 @@ Also notice that when installing in this way the content of
142142
``py4web/assets`` folder is missing at first but it is manually created
143143
later with the ``make assets`` command.
144144

145-
Notice that you also (and should) install py4web from source inside a virtual environment.
145+
Notice that you can also (and should) install py4web from source inside a virtual environment.
146146

147147
Running from source without installing
148148
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -215,14 +215,14 @@ Unzip it on a local folder and open a command line there. Finally run
215215

216216
(omit './' if you're using Windows).
217217

218-
Notice: the binaries many not correspond to the latest master
218+
Notice: the binaries may not correspond to the latest master
219219
or the latest stable branch of py4web although we do our best to
220220
keep them up to date.
221221

222222
Upgrading
223223
---------
224224

225-
If you installed py4web from pip you can simple upgrade it with
225+
If you installed py4web from pip you can simply upgrade it with
226226

227227
::
228228

@@ -271,7 +271,7 @@ output like this:
271271
:class: with-shadow
272272

273273
Generally ``apps`` is the name of the folder where you keep all your
274-
apps, and can be explicitly set wit the ``run`` command.
274+
apps, and can be explicitly set with the ``run`` command.
275275
(Yet nothing prevents you from grouping apps in multiple folders with
276276
different names.) If that
277277
folder does not exist, it is created. PY4WEB expects to find at least
@@ -437,7 +437,7 @@ By default py4web will automatically reload an application upon any changes to t
437437
The reloading will occur on any first incoming request to the application that has
438438
been changed (lazy-mode). If you prefer an immediate reloading (sync-mode), use
439439
``py4web run --watch sync``. For production servers, it's better to use ``py4web run --watch off`` in order
440-
to avoid unneded checks (but you will need to restart py4web for activating any change).
440+
to avoid unneeded checks (but you will need to restart py4web for activating any change).
441441

442442

443443
.. note::
@@ -523,7 +523,7 @@ Finally you can manually create the file yourself with:
523523
-Y, --yes No prompt, assume yes to questions [default: False]
524524
-help, -h, --help Show this message and exit.
525525

526-
This option create a new apps folder (or reinstall it). If needed, it
526+
This option creates a new apps folder (or reinstall it). If needed, it
527527
will ask for the confirmation of the new folder’s creation and then for
528528
copying every standard py4web apps from the assets folder. It currently
529529
does nothing on binaries installations and from source installation
@@ -592,7 +592,7 @@ HTTPS
592592

593593
To use https with the build-in web server (Rocket3) these are the steps:
594594

595-
- Generate the localhost certificates. For example followed the instructions here:
595+
- Generate the localhost certificates. For example follow the instructions here:
596596

597597
https://www.section.io/engineering-education/how-to-get-ssl-https-for-localhost/.
598598

@@ -625,7 +625,7 @@ Notice that /path_to/ should be the absolute path to the location of your certif
625625
WSGI
626626
~~~~
627627

628-
py4web is a standard WSGI application. So, if a full program installation it's not
628+
py4web is a standard WSGI application. So, if a full program installation is not
629629
feasible you can simply run py4web as a WSGI app. For example, using gunicorn-cli,
630630
create a python file:
631631

@@ -719,7 +719,7 @@ On ``deployment_tools/docker`` there is a simple Dockerfile for quickly running
719719
a docker-compose.yml file for setting up a more complex multi-container with PostgreSQL.
720720
A ready docker example based on the Scaffold application can be cloned from this repository <https://github.com/macneiln/docker-py4web-scaffold>
721721

722-
Note that you can use them also with Podman, which has the advantage of does not requiring sudo and does not
722+
Note that you can use them also with Podman, which has the advantage of not requiring sudo and does not
723723
running any background daemon.
724724

725725

docs/chapter-05.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ in errors:
206206
def color(name):
207207
return f'Color name: {name}'
208208
209-
Instead, to accomplish a simmilar result, one needs to handle all the
209+
Instead, to accomplish a similar result, one needs to handle all the
210210
logic in one action:
211211

212212
.. code:: python
@@ -438,14 +438,14 @@ Watch for files change
438438
----------------------
439439

440440
As described in the :ref:`run command option`, Py4web facilitates a
441-
development server’s setup by automatically reloads an app when its
441+
development server’s setup by automatically reloading an app when its
442442
Python source files change (by default).
443443
But in fact any other files inside an app can be watched by setting a
444444
handler function using the ``@app_watch_handler`` decorator.
445445

446446
Two examples of this usage are reported now. Do not worry if you don’t
447447
fully understand them: the key point here is that even non-python code
448-
could be reloaded automatically if you explicit it with the
448+
could be reloaded automatically if you explicitly declare it with the
449449
``@app_watch_handler`` decorator.
450450

451451
Watch SASS files and compile them when edited:
@@ -496,7 +496,7 @@ In production environments it is often required to have several apps being
496496
served by a single py4web server, where different apps are mapped to
497497
different domains.
498498

499-
py4web can easily handle running multiple apps, but there is no build-in
499+
py4web can easily handle running multiple apps, but there is no built-in
500500
mechanism for mapping domains to specific applications. Such mapping needs
501501
to be done externally to py4web -- for instance using a web reverse-proxy,
502502
such as nginx.

docs/chapter-06.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Then you can apply all of them at once with:
6262

6363
Usually, it's not important the order you use to specify the fixtures, because py4web
6464
knows well how to manage them if they have explicit dependencies. For example auth
65-
depends explicitly on db and session and flash, so you do not even needs to list them.
65+
depends explicitly on db and session and flash, so you do not even need to list them.
6666

6767
But there is an important exception: the Template fixture must always be the
6868
**first one**. Otherwise, it will not have access to various things it should
@@ -281,7 +281,7 @@ Now try create a file called ``translations/it.json`` which contains:
281281
Set your browser preference to Italian: now the messages will be
282282
automatically translated to Italian.
283283
284-
Notice there is an UI in the Dashboard for creating, updating, and updating translation files.
284+
Notice there is a UI in the Dashboard for creating, updating, and managing translation files.
285285
It can be easily reached via the button ``i18n+p11n``:
286286
287287
.. image:: images/dashboard_i18n_btn.png
@@ -404,8 +404,8 @@ Opening the page in a new browser tab will give you the updated
404404
counter value. Closing and reopening the browser, or opening a
405405
new *private window*, will instead restart the counter from 0.
406406
407-
Usually the information is saved in the session object are related
408-
to the user - like its username, preferences, last pages visited,
407+
Usually the information saved in the session object is related
408+
to the user - like their username, preferences, last pages visited,
409409
shopping cart and so on. The session object has the same interface
410410
as a Python dictionary but in py4web sessions are always stored using
411411
JSON (**JWT** specifically, i.e.
@@ -431,7 +431,7 @@ set. Other parameters can be specified as well:
431431
algorithm='HS256',
432432
storage=None,
433433
same_site='Lax',
434-
name="{app_name}_sesson")
434+
name="{app_name}_session")
435435
436436
Here:
437437
@@ -870,16 +870,16 @@ Under normal circumstances above methods are executed in this order:
870870
871871
i.e. the first fixture (A) is the first one to call ``on_request``
872872
and the last one to call ``on_success``. You can think of them as layers of
873-
an onion with the action (user code) at the center. ``on_success`` is called
873+
an onion with the action (user code) at the center. ``on_request`` is called
874874
when entering a layer from the outside and ``on_success`` is called when
875875
exiting a layer from the inside (like WSGI middleware).
876876
877-
If any point an exception is raised inner layers are not called
877+
If at any point an exception is raised inner layers are not called
878878
and outer layers will call ``on_error`` instead of ``on_success``.
879879
880880
Context is a shared object which contains:
881881
882-
- content['fixtures']: the list of all the fixtures for the action.
882+
- context['fixtures']: the list of all the fixtures for the action.
883883
- context['processed']: the list of fixtures that called ``on_request`` previously within the request.
884884
- context['exception']: the exception raised by the action or any previous fixture logic (usually None)
885885
- context['output']: the action output.
@@ -1031,7 +1031,7 @@ Notably, the initializer should contain the line:
10311031
10321032
in order to initialize the thread-local storage.
10331033
Once this is done, the thread-local storage can be used to store and retrieve data
1034-
using the the ``self.local`` object.
1034+
using the ``self.local`` object.
10351035
10361036
10371037
Multiple fixtures

docs/chapter-08.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ OUTPUT:
10731073
The RestAPI response
10741074
--------------------
10751075

1076-
All RestAPI response have the fields:
1076+
All RestAPI responses have the fields:
10771077

10781078
:api_version: RestAPI version.
10791079
:timestamp: Datetime in ISO 8601 format.

docs/chapter-10.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Built-in helpers
161161
``XML``
162162
~~~~~~~
163163

164-
``XML`` is an helper object used to encapsulate text that should **not** be
164+
``XML`` is a helper object used to encapsulate text that should **not** be
165165
escaped. The text may or may not contain valid XML; for example it
166166
could contain JavaScript.
167167

@@ -442,7 +442,7 @@ The ``CODE`` helper is generally preferable for code listings.
442442
``SCRIPT``
443443
~~~~~~~~~~
444444

445-
This is for include or link a script, such as JavaScript.
445+
This is for including or linking a script, such as JavaScript.
446446

447447
.. code:: python
448448
@@ -609,7 +609,7 @@ Custom helpers
609609
``TAG``
610610
~~~~~~~
611611

612-
Sometimes you need to generate **custom XML tags***. For this purpose py4web
612+
Sometimes you need to generate **custom XML tags**. For this purpose py4web
613613
provides ``TAG``, a universal tag generator.
614614

615615
::

docs/chapter-11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Here is another example for the word “bed” in Czech
3636

3737
{"bed": {"0": "no postel", "1": "postel", "2": "postele", "5": "postelí"}}
3838

39-
To translate and pluralize a string “dog” one simply warps the string in
39+
To translate and pluralize a string “dog” one simply wraps the string in
4040
the T operator as follows:
4141

4242
::

docs/chapter-12.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Create a new minimal app called ``form_minimal`` :
128128
.. code:: python
129129
130130
# in controllers.py
131-
from py4web impot action, redirect, URL, Field
131+
from py4web import action, redirect, URL, Field
132132
from py4web.utils.form import Form
133133
from pydal.validators import *
134134
@@ -429,7 +429,7 @@ must be preceded by an underscore.
429429
Custom forms
430430
~~~~~~~~~~~~
431431

432-
Custom forms allow you to granulary control how the form is processed. In the template file, you can execute specific
432+
Custom forms allow you to granularly control how the form is processed. In the template file, you can execute specific
433433
instructions before the form is displayed or after its data submission by inserting code among the following statements:
434434

435435
.. code:: html

0 commit comments

Comments
 (0)