Skip to content

Commit

Permalink
version 1.20200502.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed May 2, 2020
1 parent ad18e3f commit c733544
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

```
python3 -m pip install -U py4web --no-cache-dir --user
py4web setup -F apps
py4web setup apps
py4web setup set-password
py4web run -F apps
py4web run apps
open http://localhost:8000/todo/index
```

Expand All @@ -20,9 +20,9 @@ open http://localhost:8000/todo/index
git clone https://github.com/web2py/py4web.git
cd py4web
python3 -m pip install -r requirements.txt
./py4web-cli setup -F apps
./py4web-cli setup set-password
./py4web-cli run -F apps
./py4web.py setup apps
./py4web.py setup set-password
./py4web.py run apps
open http://localhost:8000/todo/index
```

Expand All @@ -34,7 +34,7 @@ cd py4web
make assets
make test
make install
py4web run -F apps
py4web run apps
open http://localhost:8000/todo/index
```

Expand Down
14 changes: 7 additions & 7 deletions apps/_documentation/static/chapters/en/chapter-01.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
This will install py4web and all its dependencies. Once installed you can start it with:

``
py4web setup -F apps
py4web setup apps
py4web set-password
py4web run -F apps
py4web run apps
``:bash

This should produce an output like:
Expand Down Expand Up @@ -74,9 +74,9 @@
Once installed, you should start with
``
./py4web-cli setup -F apps
./py4web-cli set-password
./py4web-cli run -F apps
./py4web.py setup apps
./py4web.py set-password
./py4web.py run apps
``:bash
Notice the ``./`` ; it forces the run of the local folder's py4web and not the installed one.
Expand All @@ -89,7 +89,7 @@
``:bash
this will install the libraries but not the apps. To upgrade the built-in apps, delete them them run:
``
py4web setup -F apps
py4web setup apps
``:bash
### Dashboard password
Expand All @@ -105,7 +105,7 @@
Pip Install:
``
py4webt run -p password.txt -F apps
py4webt run -p password.txt apps
``:bash
### Command line options
Expand Down
5 changes: 5 additions & 0 deletions py4web.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env python3

from py4web.core import cli

cli()
2 changes: 1 addition & 1 deletion py4web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

__author__ = "Massimo Di Pierro <[email protected]>"
__license__ = "BSDv3"
__version__ = "1.20200502.1"
__version__ = "1.20200502.2"
8 changes: 4 additions & 4 deletions py4web/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import uuid
import zipfile

REX_APPJSON = re.compile("(^|\s|,)application/json(,|\s|$)")
REX_APPJSON = re.compile(r"(^|\s|,)application/json(,|\s|$)")

import click

Expand Down Expand Up @@ -1060,14 +1060,14 @@ def cli():


@cli.command()
@click.argument('apps_folder', default='apps')
@click.option('-Y', '--yes', is_flag=True, default=False, help='No prompt, assume yes to questions')
@click.option('-F', '--apps_folder', default='apps', help='Location of the apps')
def setup(**args):
install_args(args, reinstall_apps=True)


@cli.command()
@click.option('-F', '--apps_folder', default='apps', help='Location of the apps')
@click.argument('apps_folder', default='apps')
def shell(**args):
install_args(args)
fix_ansi_on_windows()
Expand All @@ -1084,8 +1084,8 @@ def set_password(password, password_file):


@cli.command()
@click.argument('apps_folder', default='apps')
@click.option('-Y', '--yes', is_flag=True, default=False, help='No prompt, assume yes to questions')
@click.option('-F', '--apps_folder', default='apps', help='Location of the apps')
@click.option('-H', '--host', default='127.0.0.1', help='Host name')
@click.option('-P', '--port', default=8000, type=int, help='Port number')
@click.option('-p', '--password_file', default='password.txt', help='File for the encrypted password')
Expand Down
2 changes: 1 addition & 1 deletion py4web/utils/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def define_tables(self):
"phone_number",
requires=[
ne,
IS_MATCH("^[+]?(\(\d+\)|\d+)(\(\d+\)|\d+|[ -])+$"),
IS_MATCH(r"^[+]?(\(\d+\)|\d+)(\(\d+\)|\d+|[ -])+$"),
],
),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def patched_cli():
dirpath = tempfile.mkdtemp()
dir = os.path.join(dirpath, "apps")
testargs = ["py4web", "run", "-d", "demo", "-F", dir]
testargs = ["py4web", "run", "-d", "demo", dir]
with patch.object(sys, "argv", testargs):
cli()

Expand Down

0 comments on commit c733544

Please sign in to comment.