mirror of
https://github.com/pyscript/pyscript.git
synced 2022-05-01 19:47:48 +03:00
Update some documentation and links.
This commit is contained in:
@@ -15,26 +15,32 @@ This is a demo Toga app implementing a Fahrenheit to Celsius converter.
|
|||||||
|
|
||||||
### Development details
|
### Development details
|
||||||
|
|
||||||
This demo bakes a pre-compiled version of pyscript into the `server/pyscript`
|
This demo symbolically links the pyscript build generated by the npm server
|
||||||
directory.
|
(`../build`) into the `./static/pyscript` directory. This symbolic link should
|
||||||
|
be restored automatically by git. This also means you'll need to run the main
|
||||||
|
pyscript demos at least once before running the server-rendered version of the
|
||||||
|
app. If you experience problems loading pyscript, check whether this link
|
||||||
|
exists, and the `build/pyscript.js` file has been compiled.
|
||||||
|
|
||||||
It also includes an experimental version of toga-core, toga-web and toga-flask,
|
It also includes an vendored experimental version of toga-core, toga-web and
|
||||||
packaged as wheels in the `server/wheels` directory.
|
toga-flask, packaged as wheels in the `./static/wheels` directory. If any changes
|
||||||
|
are made to the Toga sources, these vendored resources will need to be updated.
|
||||||
If any changes are made to the Toga sources or to PyScript, these vendored
|
|
||||||
resources will need to be updated.
|
|
||||||
|
|
||||||
## Web app
|
## Web app
|
||||||
|
|
||||||
The web app is a demo Flask server, serving a web app version of Toga at the
|
This app can be viewed as a Single Page App (SPA); this version of the app is
|
||||||
root URL. To run the web demo server:
|
linked from the main PyScript demo pages.
|
||||||
|
|
||||||
|
It can also be viewed as a server-rendered app. This version of the app is
|
||||||
|
delivered by a demo Flask server, serving a version of app at the root URL. To
|
||||||
|
run the web demo server:
|
||||||
|
|
||||||
$ cd server
|
$ cd server
|
||||||
$ PYTHONPATH=../freedom/src python -m demo
|
$ PYTHONPATH=../freedom/src python -m demo
|
||||||
|
|
||||||
then point your browser at http://localhost:8081/
|
then point your browser at http://localhost:8081/
|
||||||
|
|
||||||
Enter a value in the "farenheit" input, and click the "calculate" button.
|
Enter a value in the "Farenheit" input, and click the "calculate" button.
|
||||||
|
|
||||||
It may take a few seconds for this button to become live; look for the
|
It may take a few seconds for this button to become live; look for the
|
||||||
"Collecting nodes..." entry in the console log.
|
"Collecting nodes..." entry in the console log.
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ formal_name = "Freedom Units"
|
|||||||
description = "A testing app"
|
description = "A testing app"
|
||||||
sources = ['src/freedom']
|
sources = ['src/freedom']
|
||||||
requires = [
|
requires = [
|
||||||
'../server/static/wheels/toga_core-0.3.0.dev33-py3-none-any.whl',
|
'../static/wheels/toga_core-0.3.0.dev33-py3-none-any.whl',
|
||||||
'../server/static/wheels/travertino-0.1.3-py3-none-any.whl',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ wheel
|
|||||||
check-manifest
|
check-manifest
|
||||||
briefcase
|
briefcase
|
||||||
flask==2.1.1
|
flask==2.1.1
|
||||||
server/static/wheels/toga_core-0.3.0.dev33-py3-none-any.whl
|
static/wheels/toga_core-0.3.0.dev33-py3-none-any.whl
|
||||||
server/static/wheels/toga_flask-0.3.0.dev33-py3-none-any.whl
|
static/wheels/toga_flask-0.3.0.dev33-py3-none-any.whl
|
||||||
server/static/wheels/toga_web-0.3.0.dev33-py3-none-any.whl
|
static/wheels/toga_web-0.3.0.dev33-py3-none-any.whl
|
||||||
server/static/wheels/travertino-0.1.3-py3-none-any.whl
|
static/wheels/travertino-0.1.3-py3-none-any.whl
|
||||||
|
|||||||
Reference in New Issue
Block a user