Skip to content

Commit c733544

Browse files
committed
version 1.20200502.2
1 parent ad18e3f commit c733544

File tree

7 files changed

+25
-20
lines changed

7 files changed

+25
-20
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
```
88
python3 -m pip install -U py4web --no-cache-dir --user
9-
py4web setup -F apps
9+
py4web setup apps
1010
py4web setup set-password
11-
py4web run -F apps
11+
py4web run apps
1212
open http://localhost:8000/todo/index
1313
```
1414

@@ -20,9 +20,9 @@ open http://localhost:8000/todo/index
2020
git clone https://github.com/web2py/py4web.git
2121
cd py4web
2222
python3 -m pip install -r requirements.txt
23-
./py4web-cli setup -F apps
24-
./py4web-cli setup set-password
25-
./py4web-cli run -F apps
23+
./py4web.py setup apps
24+
./py4web.py setup set-password
25+
./py4web.py run apps
2626
open http://localhost:8000/todo/index
2727
```
2828

@@ -34,7 +34,7 @@ cd py4web
3434
make assets
3535
make test
3636
make install
37-
py4web run -F apps
37+
py4web run apps
3838
open http://localhost:8000/todo/index
3939
```
4040

apps/_documentation/static/chapters/en/chapter-01.mm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
This will install py4web and all its dependencies. Once installed you can start it with:
1717

1818
``
19-
py4web setup -F apps
19+
py4web setup apps
2020
py4web set-password
21-
py4web run -F apps
21+
py4web run apps
2222
``:bash
2323

2424
This should produce an output like:
@@ -74,9 +74,9 @@
7474
Once installed, you should start with
7575
7676
``
77-
./py4web-cli setup -F apps
78-
./py4web-cli set-password
79-
./py4web-cli run -F apps
77+
./py4web.py setup apps
78+
./py4web.py set-password
79+
./py4web.py run apps
8080
``:bash
8181
8282
Notice the ``./`` ; it forces the run of the local folder's py4web and not the installed one.
@@ -89,7 +89,7 @@
8989
``:bash
9090
this will install the libraries but not the apps. To upgrade the built-in apps, delete them them run:
9191
``
92-
py4web setup -F apps
92+
py4web setup apps
9393
``:bash
9494
9595
### Dashboard password
@@ -105,7 +105,7 @@
105105
Pip Install:
106106
107107
``
108-
py4webt run -p password.txt -F apps
108+
py4webt run -p password.txt apps
109109
``:bash
110110
111111
### Command line options

py4web.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env python3
2+
3+
from py4web.core import cli
4+
5+
cli()

py4web/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818

1919
__author__ = "Massimo Di Pierro <massimo.dipierro@gmail.com>"
2020
__license__ = "BSDv3"
21-
__version__ = "1.20200502.1"
21+
__version__ = "1.20200502.2"

py4web/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import uuid
3333
import zipfile
3434

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

3737
import click
3838

@@ -1060,14 +1060,14 @@ def cli():
10601060

10611061

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

10681068

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

10851085

10861086
@cli.command()
1087+
@click.argument('apps_folder', default='apps')
10871088
@click.option('-Y', '--yes', is_flag=True, default=False, help='No prompt, assume yes to questions')
1088-
@click.option('-F', '--apps_folder', default='apps', help='Location of the apps')
10891089
@click.option('-H', '--host', default='127.0.0.1', help='Host name')
10901090
@click.option('-P', '--port', default=8000, type=int, help='Port number')
10911091
@click.option('-p', '--password_file', default='password.txt', help='File for the encrypted password')

py4web/utils/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def define_tables(self):
204204
"phone_number",
205205
requires=[
206206
ne,
207-
IS_MATCH("^[+]?(\(\d+\)|\d+)(\(\d+\)|\d+|[ -])+$"),
207+
IS_MATCH(r"^[+]?(\(\d+\)|\d+)(\(\d+\)|\d+|[ -])+$"),
208208
],
209209
),
210210
)

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def patched_cli():
1313
dirpath = tempfile.mkdtemp()
1414
dir = os.path.join(dirpath, "apps")
15-
testargs = ["py4web", "run", "-d", "demo", "-F", dir]
15+
testargs = ["py4web", "run", "-d", "demo", dir]
1616
with patch.object(sys, "argv", testargs):
1717
cli()
1818

0 commit comments

Comments
 (0)