onlyphantom / pyscript-guestbook

Building a guestbook with pyscript

Home Page:https://onlyphantom.github.io/pyscript-guestbook/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesnt work

vv01f opened this issue · comments

commented

tested on firefox, brave and chromium

entering the line and confirming with enter doesn't do a thing. clicking the button results in the very same, nothing happens.

also expectation for a guestbook is, that someone (e.g. you) else can read the entry of the guest (e.g. me). looking at the code I cannot identify any storage.

Hey @vv01f I'm gonna check on the ENTER and the button click behavior. Thanks for raising the issue!

For storage, the easiest is to use localStorage to .setItem and .getItem, but you can make a trip to a db if desired. I wanted to keep the tutorial focused on pyscript's side of things but yes I'll be happy to extend that into a separate video in the future.

localStorage.setItem("guestname", whatever_value_here);

SessionStorage is also another option, but db somewhere ( or even a sqlite? ) makes the most sense