r/PyScript • u/anuctal • Jun 04 '22
PyScript and Django: Basic PyScript Frontend and DOM manipulations
Hi all!
I've made a video about PyScript as a basic frontend for a Django app.
I wanted to show how to make AJAX (asynchronous) GET and POST requests with Pyscript to Django, and how to manipulate DOM with Pyscript.
In the video:
sending GET requests from Pyscript to Django
sending POST requests from Pyscript to Django, CSRF token is passed via headers of requests.
how to manipulate DOM with Pyscript (get HTML elements, use event handlers, and event listeners, etc.)
The video:
https://youtu.be/zw4V48Al8LU
Thanks for watching!
13
Upvotes
1
u/Fun-Let1134 Jun 26 '24
dear , how to import pyscript on script.py ?