py4web YATL equivalent of SCRIPT

123 views
Skip to first unread message

John Bannister

unread,
Sep 6, 2019, 9:33:08 AM9/6/19
to web2py-users
Hi All,

Have finally had a bit of time to play again with py4web the objective being to port a smallish app from web2py to py4web (very much as a learning and familiarisation/evaluation exercise).

The main objective is to see if I can create the equivalent of a working web2py app with py4web without having to learn a new language/languages or install a range of additional packages to achieve similar functionality / UI that I have in web2py with a similar amount of code (or less would be good as well).

I am no expert in JS and the vue route looks pretty complex compared to the standard HTML forms.

In the instances where I do need to use JS I generally tend to create the script inside a controller and use the SCRIPT or ASSIGNJS helper to pass it to the view. 

Using yatl (py4web) these helpers seem to be missing or maybe I am missing something?

Any ideas on what the equivalent yatl (if any) would be or if what I am trying to do is defeating the object of the exercise?

Thanks in advance 
   
 

Massimo Di Pierro

unread,
Sep 6, 2019, 12:20:04 PM9/6/19
to web2py-users
Py4web does not require that you use Vue or the vue router. The auth page uses Vue but you do not necessary need to touch it.

Yes yatl has less helpers than web2py but you make your own.

See how they are defined:

https://github.com/web2py/yatl/blob/2eb050b8e251813e905ecbabba839ca578901a3a/yatl/helpers.py#L112

John Bannister

unread,
Sep 7, 2019, 3:25:09 AM9/7/19
to web...@googlegroups.com
Thanks Massimo,

Will definitely take a look and do the necessary. With regards the general Auth functionalitly, do you have some example or guidelines as to how this will work?

Thanks in advance
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/7c1e0efc-e534-437e-9875-8649c1f6431f%40googlegroups.com.

Massimo Di Pierro

unread,
Sep 8, 2019, 11:49:23 PM9/8/19
to web2py-users
Auth mostly works. There is an example in the scaffolding app. SAML does not work. PAM and LDAP need testing and probably minor tweaks.


On Saturday, 7 September 2019 00:25:09 UTC-7, John Bannister wrote:
Thanks Massimo,

Will definitely take a look and do the necessary.  With regards the general Auth functionalitly, do you have some example or guidelines as to how this will work?

Thanks in advance

-----Original Message-----
From: web...@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimo Di Pierro
Sent: 06 September 2019 18:20
To: web2py-users
Subject: [web2py] py4web YATL equivalent of SCRIPT

Py4web does not require that you use Vue or the vue router. The auth page uses Vue but you do not necessary need to touch it.

Yes yatl has less helpers than web2py but you make your own.

See how they are defined:

https://github.com/web2py/yatl/blob/2eb050b8e251813e905ecbabba839ca578901a3a/yatl/helpers.py#L112

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages