flask-meld

153 views
Skip to first unread message

Jim Steil

unread,
Dec 17, 2020, 3:56:32 PM12/17/20
to py4web
I just came across this today.


Pretty interesting

I wish I knew javascript well enough to try to translate to work with py4web.

-Jim


Jacinto Parga

unread,
Dec 17, 2020, 4:43:00 PM12/17/20
to py4web
Yes, it is very interesting.

Massimo DiPierro

unread,
Dec 18, 2020, 11:00:46 AM12/18/20
to Jim Steil, py4web
This is pretty much what py4web already does with it's components. Just the syntax is different. The syntax could be cloned with some custom helpers. I can probably provide a translation example.

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/5447fe12-ae3f-43d7-b2b6-d231a540b33an%40googlegroups.com.

Jim Steil

unread,
Dec 18, 2020, 11:02:50 AM12/18/20
to py4web
That would be awesome.  I'm excited to see something like that...

Kevin Keller

unread,
Feb 26, 2021, 1:40:43 PM2/26/21
to Jim Steil, py4web
Can we use the py4web load components to also push data to the client like Elxir/Liveview does?

Would someone be able to translate the flask meld samples on this page to py4web load component sampes?


I will try but lets see how far I can get. 

Most important for me to learn would be how to easily push data to the client with py4web tooling avoiding JS where possible. 
Maybe using the load component? 

Would not know how thought atm. 



cloudHQPowered by
cloudHQ

Jim Steil

unread,
Feb 26, 2021, 2:51:31 PM2/26/21
to py4web
Kevin

I've been spending a lot of time with vue.js the past few weeks and thinking about how to best integrate with py4web.  I have a sample grid working, but don't yet have it integrated with forms.  Luca offered some help but I haven't had a chance to look at his work yet.

I'm mentioning this here because it does the same things flask-meld.  I'm hoping to have some things to show in the coming weeks.

-Jim

Kevin Keller

unread,
Feb 26, 2021, 2:58:37 PM2/26/21
to Jim Steil, py4web
Thst is super cool.

Do you also support push messages from py4web into your vue app?

How do you do authentication?


Do you use the the current standard endpoints?

It woukd still be great to understand how to use push with py4web in general with components.

We could also easily integrate those into vue spa I think.

Anyhow exciting news all around. 

I will be able to get some stuff done on the Auth apis tomrrow finally. Blocked that day for it. 



Jim Steil

unread,
Feb 26, 2021, 3:20:27 PM2/26/21
to py4web
Kevin

My work with Vue and py4web to this point is NOT using SPA.  I'm generating all the vue parts rendering them from the server.  I plan to look more at SPA down the road, but for now just looking to integrate some vue components into my html.  

-Jim

Kevin Keller

unread,
Feb 26, 2021, 8:45:31 PM2/26/21
to Jim Steil, py4web
Ah got it.

Thanks!

Still sounds awesome :) 

Kevin Keller

unread,
Mar 10, 2021, 7:22:37 AM3/10/21
to Jim Steil, py4web
Massimo, 

I started playing around with py4web components. 

Its really great, but I do not see how it could do something interactive as flask-meld does. 

For examples the simple counter:


Could you maybe show a minimal example of a py4web component that can implement such an interactive counter? 

Or is the idea that I just encapsulate the JS code in the component and re-use the component? 

I would be still writing JS just as I would not using components right? 

Only advantage is I can package it up nicely for easier re-use. 

Anyhow, I dont get how we can use components to write LESS JS with py4web.

Maybe a counter example would be great. 

In flask-meld I can write the component in Python, which is actually the great thing. 

Could we do something similar with py4web ? or yatl? Would you just use callback buttons? 

Thanks!! 


Kevin Keller

unread,
Mar 10, 2021, 7:25:21 AM3/10/21
to Jim Steil, py4web
The most interesting example btw would be to have a todo list that updates itself automatically (interactivelty) as I add or remove todos. 

So if that is possible with components that would be an even better example. 

But I take what I can get just to have a kickstart and I think I can take it then from there to develop more complex examples along the way myself and share. 


Kevin Keller

unread,
Mar 10, 2021, 7:45:01 AM3/10/21
to Jim Steil, py4web
Also there seem many undocumented functions that are usefil for component loading in utls.js like load_and_trap is this similiar to ajax=True im web2py? 


Kevin Keller

unread,
Mar 10, 2021, 7:56:45 AM3/10/21
to Jim Steil, py4web
I suppose we would need to add more factories to the callbacks available in utils/factories.py right?

e.g. remove the classlist_add_clicked and and update the div instead where the counter values would show?

maybe call in callback_update_div and CallBackUpdateDiv Factory. 

I will stop it now, sorry for the spam. 

Just thought it was an interesting train of thought. 

Thanks 

image.png
image.png
Reply all
Reply to author
Forward
0 new messages