Skip to content

Commit bb25511

Browse files
authored
Update cdn version for python examples (#983)
1 parent 77aff38 commit bb25511

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

examples/django/ds/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import time
33
from datetime import datetime
44

5+
from datastar_py.consts import VERSION
56
from datastar_py.django import (
67
DatastarResponse,
78
ServerSentEventGenerator,
@@ -18,7 +19,7 @@
1819
<head>
1920
<title>DATASTAR on Django (ASGI)</title>
2021
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
21-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-beta.11/bundles/datastar.js"></script>
22+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
2223
<style>
2324
html, body { height: 100%; width: 100%; }
2425
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -76,7 +77,7 @@ async def time_updates():
7677
<head>
7778
<title>DATASTAR on Django (WSGI)</title>
7879
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
79-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-beta.11/bundles/datastar.js"></script>
80+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
8081
<style>
8182
html, body { height: 100%; width: 100%; }
8283
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }

examples/fastapi/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from datetime import datetime
1313

1414
import uvicorn
15+
from datastar_py.consts import VERSION
1516
from datastar_py.fastapi import (
1617
DatastarResponse,
1718
ReadSignals,
@@ -30,7 +31,7 @@
3031
<head>
3132
<title>DATASTAR on FastAPI</title>
3233
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
33-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-beta.11/bundles/datastar.js"></script>
34+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
3435
<style>
3536
html, body { height: 100%; width: 100%; }
3637
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }

examples/litestar/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from datetime import datetime
1313

1414
import uvicorn
15+
from datastar_py.consts import VERSION
1516
from datastar_py.litestar import (
1617
DatastarResponse,
1718
ServerSentEventGenerator,
@@ -28,7 +29,7 @@
2829
<head>
2930
<title>DATASTAR on Litestar</title>
3031
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
31-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-beta.11/bundles/datastar.js"></script>
32+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
3233
<style>
3334
html, body { height: 100%; width: 100%; }
3435
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }

examples/quart/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import asyncio
1111
from datetime import datetime
1212

13+
from datastar_py.consts import VERSION
1314
from datastar_py.quart import (
1415
DatastarResponse,
1516
ServerSentEventGenerator,
@@ -26,7 +27,7 @@
2627
<head>
2728
<title>DATASTAR on Quart</title>
2829
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
29-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-beta.11/bundles/datastar.js"></script>
30+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
3031
<style>
3132
html, body { height: 100%; width: 100%; }
3233
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }

examples/sanic/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import asyncio
1111
from datetime import datetime
1212

13-
from datastar_py.consts import ElementPatchMode
13+
from datastar_py.consts import ElementPatchMode, VERSION
1414
from datastar_py.sanic import (
1515
DatastarResponse,
1616
ServerSentEventGenerator,
@@ -29,7 +29,7 @@
2929
<head>
3030
<title>DATASTAR on Sanic</title>
3131
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
32-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-beta.11/bundles/datastar.js"></script>
32+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
3333
<style>
3434
html, body { height: 100%; width: 100%; }
3535
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }

0 commit comments

Comments
 (0)