I've played with it a bit.  After using web2py, I miss some of the web2py 
features that aren't there in py4web.  SQLFORM.grid is the biggest one.  I 
use that all over the place.  I think Massimo is working on something 
similar in py4web but I haven't seen it yet.

For those of us with large web2py code bases, it seems like py4web isn't 
there yet.  It still needs some more of the web2py built-in capabilities 
(SQLFORM.grid, Authorization) before I could move to it.  Yes, I could 
write them myself, but I'm not as bright as Massimo and the others that 
contribute to the project.  Also, there seems to be more of a push to move 
to javascript front-end using Vue.js.  While I agree that is a great 
feature to have, it would be helpful for us old web2py guys to move to 
py4web with our current knowledge.

For me, I'm sticking with web2py for now and waiting to see where py4web 
goes in the next few months.

-Jim

On Thursday, April 23, 2020 at 10:29:02 AM UTC-5, Jon Paris wrote:
>
> Thanks Jim - I appreciate it.
>
> Yes - I keep forgetting that for some reason Python has redefined a lot of 
> terms. Dictionaries confused me until I realized that they were pretty much 
> the same as keyed arrays in PHP and other languages. Not sure why so much 
> relabelling but it certainly makes the learning curve a little steeper.
>
> I'm trying to get py4web running for comparison as that seems to be the 
> natural follow on to to web2py. Have you any experience with that?
>
> On Apr 23, 2020, at 11:05 AM, Jim S <ato....@gmail.com <javascript:>> 
> wrote:
>
> Jon
>
> I'd really encourage you to not give up on this.  I think your assessment 
> is correct; there have been a lot changes to the code since that doc was 
> originally written and it might be hard to navigate.  I went through it 
> back in 2011, I read it from front to back before even trying to code with 
> it.
>
> I'd had experience with other Python web frameworks, most notably, 
> TurboGears.  Web2py was a breath of fresh air.  So well documented, so well 
> thought out.
>
> However, at that time, I'd been coding in Python for about 6 years 
> already.  I think some of the bumps you're running into might be due to 
> being newer to Python; decorators for example, are a python concept.
>
> If you're looking for a python web framework to get started with, I think 
> web2py is the most approachable.  I've also worked with Flask a bit and 
> feel that web2py gives you a lot more 'out of the box' whereas Flask 
> requires you to make decisions on which extensions to use.  Django is a 
> great framework, but it just never clicked with me
>
> I'm happy to help you in any way I can.  You've given so much to the IBM i 
> community.  It's my way of saying thank you.
>
> Let me know if you'd like to get on a call or video conference sometime.  
> I'm pretty flexible with my schedule.
>
> -Jim
>
> On Thursday, April 23, 2020 at 9:52:25 AM UTC-5, Jon Paris wrote:
>>
>> Responses in-line Jim - but before I get to that I really want to thank 
>> you for your assistance and patience.  I now have to give some serious 
>> thought to whether following this document is a worthwhile exercise as it 
>> seems to be so far off the mark as far as the current version is concerned. 
>>
>> On Wednesday, April 22, 2020 at 6:55:35 PM UTC-4, Jim S wrote:
>>>
>>> That is your default.py, correct?
>>>
>>
>> Correct
>>  
>>
>>> Which function are you trying to protect with authorization?  I'm 
>>> guessing it's the index or show.
>>>
>>
>> I'm just trying to follow the documentation - more in a moment
>>
>> First off, I'd get rid of the user and download functions you added.  
>>> They are already in place as they should be (the ones at the bottom are 
>>> what you want).
>>>
>>
>> Wow - obviously another case where the documentation has been made 
>> obsolete by changes in the scaffold code.  I didn't notice that. The 
>> scaffold includes so much and nothing in the docs gives any hint as to 
>> whether it is needed and "just leave it alone" or what you should do. I get 
>> the feeling that this tutorial was very useful for an earlier version of 
>> the tool but has not been updated as changes were made. I now know to look 
>> at every singe function I'm told to add to see if a version is already in 
>> place. 
>>
>> The problem now is it is not longer clear which code causes these things 
>> to be actioned. I now know that all that was needed was the 
>> @auth.requires_login()  
>>   
>>
>>> If I'm correct in my guess about protecting index or show, then you need 
>>> to add a decorator to them.
>>>
>>> I'd add
>>>
>>> @auth.requires_login() 
>>>
>>> on the line above:
>>>
>>> def show():
>>>
>>
>> I did that and removed the dups and it now works as it should.  Now that 
>> I know this I went back to the document and I now see why I missed it. The 
>> wording is "We can now decorate the functions that we want to restrict, 
>> for example:" - note the "for example".  Since I wasn't interested in 
>> "decorating" (because to me based on other tools I have used it means to 
>> pretty up and add text labels, colors,  etc.). I foolishly assumed that all 
>> the other lines I had been told to add were what would invoke the 
>> authentication.
>>
>> Anyway - thanks again.  Maybe I'll try one more section before I give up 
>> on this thing.
>>
>>    
>>
>
> -- 
> 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 web...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/3a7865a7-6e9a-48c0-9e26-aeb9674b792e%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/web2py/3a7865a7-6e9a-48c0-9e26-aeb9674b792e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/48cb46d9-ad99-44a7-a77a-ef18aa1c6c7e%40googlegroups.com.

Reply via email to