You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/py-config-fetch.md
+6-23Lines changed: 6 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -42,14 +42,6 @@ In this first step, we will create the `index.html` file and import both `pyscri
42
42
43
43
Now we will use the `fetch` configuration from `py-config` to fetch the `todo.py` and `utils.py` files from a remote server and store them in a local directory called `todo`. Here we will fetch files from different URLs, using a `fetch` per item.
44
44
45
-
Also, remember when we said that we needed three things? We actually need four things. We also need
46
-
to fetch `pyscript.py` because we will use the `Element` class to interact with the DOM.
47
-
48
-
```{note}
49
-
We are not going into in-depth as to why we need to fetch `pyscript.py` here. The short version is that PyScript isn't installed in the filesystem when we fetch the files.
50
-
```
51
-
52
-
53
45
```html
54
46
<!DOCTYPE html>
55
47
<htmllang="en">
@@ -65,15 +57,12 @@ We are not going into in-depth as to why we need to fetch `pyscript.py` here. Th
65
57
66
58
<body>
67
59
<py-config>
68
-
[[fetch]]
69
-
from = "https://raw.githubusercontent.com/pyscript/pyscript/main/pyscriptjs/src/python/"
70
-
files = ["pyscript.py"]
71
-
[[fetch]]
72
-
from = "https://pyscript.net/examples/"
73
-
files = ["utils.py"]
74
-
[[fetch]]
75
-
from = "https://gist.githubusercontent.com/FabioRosado/faba0b7f6ad4438b07c9ac567c73b864/raw/37603b76dc7ef7997bf36781ea0116150f727f44/"
76
-
files = ["todo.py"]
60
+
[[fetch]]
61
+
from = "https://pyscript.net/examples/"
62
+
files = ["utils.py"]
63
+
[[fetch]]
64
+
from = "https://gist.githubusercontent.com/FabioRosado/faba0b7f6ad4438b07c9ac567c73b864/raw/37603b76dc7ef7997bf36781ea0116150f727f44/"
65
+
files = ["todo.py"]
77
66
</py-config>
78
67
</body>
79
68
</html>
@@ -100,9 +89,6 @@ Now we will create the todo elements in the `body` of the `index.html` file.
100
89
101
90
<body>
102
91
<py-config>
103
-
[[fetch]]
104
-
from = "https://raw.githubusercontent.com/pyscript/pyscript/main/pyscriptjs/src/python/"
105
-
files = ["pyscript.py"]
106
92
[[fetch]]
107
93
from = "https://pyscript.net/examples/"
108
94
files = ["utils.py"]
@@ -155,9 +141,6 @@ This is where the magic happens. We can import the `todo.py` file by adding it a
155
141
156
142
<body>
157
143
<py-config>
158
-
[[fetch]]
159
-
from = "https://raw.githubusercontent.com/pyscript/pyscript/main/pyscriptjs/src/python/"
0 commit comments