Re: [web2py] Re: web3py again....

2019-04-07 Thread Anthony
Not sure what that means -- Massimo will have to reply. Once a module has 
been loaded within a given Python process, it won't be repeatedly reloaded 
-- see https://docs.python.org/3/reference/import.html#the-module-cache. 
web2py model and controller files are executed on every request -- if they 
import a module, there will be a very small performance hit to look up the 
module in sys.modules on each request (trivial relative to the cost of 
initializing the module on the very first request), but given web2py's 
execution model, there is nothing you will do to eliminate that.

Anthony

On Sunday, April 7, 2019 at 1:55:06 PM UTC-4, João Matos wrote:
>
> That was the word used by Massimo.
> He stated
> "In web2py we do not reload the modules. we reimport them at every 
> request. this causes a performance penalty and is only needed in 
> development."
> My question was if it is possible to disable module reimport at every 
> request in production or it just how web2py is built.
>
>
> domingo, 7 de Abril de 2019 às 18:51:09 UTC+1, Anthony escreveu:
>>
>> On Sunday, April 7, 2019 at 1:33:22 PM UTC-4, João Matos wrote:
>>>
>>> @Anthony
>>>
>>> I was asking about reimport not reload.
>>> Does track_changes appy to both?
>>>
>>
>> What do you mean by "reimport"?
>>
>> Anthony
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-07 Thread João Matos
That was the word used by Massimo.
He stated
"In web2py we do not reload the modules. we reimport them at every request. 
this causes a performance penalty and is only needed in development."
My question was if it is possible to disable module reimport at every 
request in production or it just how web2py is built.


domingo, 7 de Abril de 2019 às 18:51:09 UTC+1, Anthony escreveu:
>
> On Sunday, April 7, 2019 at 1:33:22 PM UTC-4, João Matos wrote:
>>
>> @Anthony
>>
>> I was asking about reimport not reload.
>> Does track_changes appy to both?
>>
>
> What do you mean by "reimport"?
>
> Anthony
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-07 Thread Anthony
On Sunday, April 7, 2019 at 1:33:22 PM UTC-4, João Matos wrote:
>
> @Anthony
>
> I was asking about reimport not reload.
> Does track_changes appy to both?
>

What do you mean by "reimport"?

Anthony

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-07 Thread João Matos
@Anthony

I was asking about reimport not reload.
Does track_changes appy to both?


domingo, 7 de Abril de 2019 às 18:30:24 UTC+1, Anthony escreveu:
>
> On Sunday, April 7, 2019 at 1:19:08 PM UTC-4, João Matos wrote:
>>
>> @Massimo
>>
>> You state
>> "In web2py we do not reload the modules. we reimport them at every 
>> request. this causes a performance penalty and is only needed in 
>> development."
>>
>> Does this mean it is possible to disable module reimport at every request 
>> in web2py when in production (or did I misunderstood you)? How?
>>
>
> Unless you have the following in a model file:
>
> from gluon.custom_import import track_changes; track_changes(True)
>
>  
> modules are not reloaded. And even with the above, they are only reloaded 
> if they have changed.
>
> Anthony
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-07 Thread Anthony
On Sunday, April 7, 2019 at 1:19:08 PM UTC-4, João Matos wrote:
>
> @Massimo
>
> You state
> "In web2py we do not reload the modules. we reimport them at every 
> request. this causes a performance penalty and is only needed in 
> development."
>
> Does this mean it is possible to disable module reimport at every request 
> in web2py when in production (or did I misunderstood you)? How?
>

Unless you have the following in a model file:

from gluon.custom_import import track_changes; track_changes(True)

 
modules are not reloaded. And even with the above, they are only reloaded 
if they have changed.

Anthony

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-07 Thread João Matos
@Massimo

You state
"In web2py we do not reload the modules. we reimport them at every request. 
this causes a performance penalty and is only needed in development."

Does this mean it is possible to disable module reimport at every request 
in web2py when in production (or did I misunderstood you)? How?


-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-07 Thread Kevin Keller
I couldn't find the numbers that quickly, but key point is the bigger Flask
community and plugin availability. Also if people look for job for
companies that use python most of the time they look for Flask or Django
experience.

Web3Py build on Flask would also remove the questions for beginners if they
should use Flask or Web3py in which case they will most likely start with
Flask.

With Web3py having a flask component but the added value of pydal, yatl,
sqlform and web2py Auth they would go for Web3py for sure.

Now I perfectly understand however, that Web3py based on bottle would have
a higher potential to be its own thing and find a community of its own and
possibly even increase interest in all its moving parts such as bottle in
reverse.

And also effectively reducing the risk of Web3py being seen as just an
extension as it could possibly happen with Flask, but actually being seen
for what it is: much more than its moving parts combined.






I guess it depends which end goal is more desirable.



On Sun, 7 Apr 2019, 06:32 Massimo Di Pierro, 
wrote:

> I like bottle because it is simpler than flask. Can you make a good case
> for why Flask over bottle?
>
> On Tuesday, 2 April 2019 00:56:31 UTC-7, Kevin Keller wrote:
>>
>> Here is a project that generates swagger(openapi) documentation for
>> flask+sqlalchemy.  https://github.com/thomaxxl/safrs
>> I was already wondering about changing bottle with flask, but I dont know
>> if that is heresy now :).
>>
>> On Tue, Apr 2, 2019 at 9:31 AM Kevin Keller  wrote:
>>
>>>
>>> https://editor.swagger.io/?_ga=2.227432986.689200959.1554189909-55439989.1547630410
>>>
>>>
>>> Swagger JSON editor + https://swagger.io/specification/. So one Swagger
>>> Json file can contain the description of all the endpoints.
>>>
>>> On Tue, Apr 2, 2019 at 9:19 AM Kevin Keller  wrote:
>>>
 I agree.

 In fact, the whole client side today should be Javascript and just
 communicate via REST+JWT (even though in the enerprise space you will also
 need OAUTH2).

  The models need to be exposed via REST easiliy and it should be easy
 to add auth to routes with JWT. Also the REST endpoints once defined, need
 to generate openapi(swagger) documents automatically.

 This is much like the JSON route you wanted to go, but with openapi we
 would be using an actual standard and do not tie ourselves to one
 Javascript framework and once specific JSON format.

  With that we could use something like this:
 https://api-platform.com/docs/client-generator/ that generates Vue.js
 or React.js CRUD pages basted on teh openapi documentation for the REST
 endpoints.

 On Tue, Apr 2, 2019 at 8:58 AM Massimo Di Pierro <
 massimo.dipie...@gmail.com> wrote:

> Th problem with SQLFORM is that different CSS libraries require
> different HTML stuctures. It is not as simple as selecting a class or div
> vs span. In web2py we have code to deal with bootstrap 2 and 3. We apply
> both classes. It is horrible. We should move away from generating html
> server side for forms. We should pass a json description and generate it
> client side
>
> On Sunday, 31 March 2019 00:54:23 UTC-7, 黄祥 wrote:
>>
>> Backporting SQLFORM, grid and Auth, should not be that complicated,
>>> although I think we can do better.
>>>
>>
>> sqlform, grid and auth is a great helper to make web2py as rapid
>> application development, but please consider some of users who want to 
>> use
>> another css or js framework.
>> perhaps just follow the python principle 'Explicit is better than
>> implicit', something like
>> sqlform(), sqlform.grid() or form() signature have style='bootstrap',
>> or class='something' or tag='div|span|table|tr|td'
>> not sure just an idea
>> perhaps can stick with the initial idea
>> ref:
>> https://groups.google.com/forum/#!msg/web2py/89a846kPeGA/nUpNJB_VCAAJ
>>
>> best regards,
>> stifan
>>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>
 --
> 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 

Re: [web2py] Re: web3py again....

2019-04-06 Thread Massimo Di Pierro
I like bottle because it is simpler than flask. Can you make a good case 
for why Flask over bottle?

On Tuesday, 2 April 2019 00:56:31 UTC-7, Kevin Keller wrote:
>
> Here is a project that generates swagger(openapi) documentation for 
> flask+sqlalchemy.  https://github.com/thomaxxl/safrs
> I was already wondering about changing bottle with flask, but I dont know 
> if that is heresy now :). 
>
> On Tue, Apr 2, 2019 at 9:31 AM Kevin Keller  wrote:
>
>>
>> https://editor.swagger.io/?_ga=2.227432986.689200959.1554189909-55439989.1547630410
>>  
>>
>> Swagger JSON editor + https://swagger.io/specification/. So one Swagger 
>> Json file can contain the description of all the endpoints. 
>>
>> On Tue, Apr 2, 2019 at 9:19 AM Kevin Keller  wrote:
>>
>>> I agree. 
>>>
>>> In fact, the whole client side today should be Javascript and just 
>>> communicate via REST+JWT (even though in the enerprise space you will also 
>>> need OAUTH2). 
>>>
>>>  The models need to be exposed via REST easiliy and it should be easy to 
>>> add auth to routes with JWT. Also the REST endpoints once defined, need to 
>>> generate openapi(swagger) documents automatically. 
>>>
>>> This is much like the JSON route you wanted to go, but with openapi we 
>>> would be using an actual standard and do not tie ourselves to one 
>>> Javascript framework and once specific JSON format. 
>>>
>>>  With that we could use something like this: 
>>> https://api-platform.com/docs/client-generator/ that generates Vue.js 
>>> or React.js CRUD pages basted on teh openapi documentation for the REST 
>>> endpoints. 
>>>
>>> On Tue, Apr 2, 2019 at 8:58 AM Massimo Di Pierro <
>>> massimo.dipie...@gmail.com> wrote:
>>>
 Th problem with SQLFORM is that different CSS libraries require 
 different HTML stuctures. It is not as simple as selecting a class or div 
 vs span. In web2py we have code to deal with bootstrap 2 and 3. We apply 
 both classes. It is horrible. We should move away from generating html 
 server side for forms. We should pass a json description and generate it 
 client side

 On Sunday, 31 March 2019 00:54:23 UTC-7, 黄祥 wrote:
>
> Backporting SQLFORM, grid and Auth, should not be that complicated, 
>> although I think we can do better.
>>
>
> sqlform, grid and auth is a great helper to make web2py as rapid 
> application development, but please consider some of users who want to 
> use 
> another css or js framework.
> perhaps just follow the python principle 'Explicit is better than 
> implicit', something like
> sqlform(), sqlform.grid() or form() signature have style='bootstrap', 
> or class='something' or tag='div|span|table|tr|td'
> not sure just an idea
> perhaps can stick with the initial idea
> ref:
> https://groups.google.com/forum/#!msg/web2py/89a846kPeGA/nUpNJB_VCAAJ
>
> best regards,
> stifan
>
 -- 
 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.
 For more options, visit https://groups.google.com/d/optout.

>>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-02 Thread John Underhill
I think all this bears some brainstorming in light of what’s going on with 
Webassembly.

I’m not saying Javascript for building web UIs isn’t the future, but...

Ok, quick show of hands: How many people absolutely adore Javascript?  Oh wait, 
it doesn’t matter, because we have no choice.  Or do we?

What if we could develop the whole app in Python, front end and back end?  What 
if we could develop front end apps for the browser in Python, with Web2py (or 
its successor)?  And they ran really fast, and integrated transparently with 
back-end services, also written in Python?

Not sure exactly what this would look like, but I’ve been pushing it around for 
a while.  At the very least this has the potential to make my life much easier. 
 We probably need some pieces that aren’t there yet (but probably they will be 
shortly).

What do you all think?

John


From: web2py@googlegroups.com on behalf of Carlos Costa 

Sent: Tuesday, April 2, 2019 2:09 PM
To: web2py-users
Subject: [web2py] Re: web3py again

Will it have default url routes?

beyond that,  my thought about ui widgets:
I think it would be nice:
1 - to have an easy integration via a model rest api
2- be agnostice to client side frameworks
3 - come with a default client side framework (preferably vue)
4 - have a ui lib by default
5 - have a template for building custom ui widgets using vue (like single page 
components or something.) that integrates easily,
maybe with some client api, with the server

Em quinta-feira, 28 de março de 2019 06:16:15 UTC-3, Massimo Di Pierro escreveu:
I know this comes up once in a while but ...

https://github.com/web2py/web3py

what do you think?

It is very preliminary but I will have an admin soon.
Backporting SQLFORM, grid and Auth, should not be that complicated, although I 
think we can do better.

Massimo


--
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 a topic in the Google 
Groups "web2py-users" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/web2py/vLw9sj6nw7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-02 Thread Kevin Keller
Here is a project that generates swagger(openapi) documentation for
flask+sqlalchemy.  https://github.com/thomaxxl/safrs
I was already wondering about changing bottle with flask, but I dont know
if that is heresy now :).

On Tue, Apr 2, 2019 at 9:31 AM Kevin Keller  wrote:

>
> https://editor.swagger.io/?_ga=2.227432986.689200959.1554189909-55439989.1547630410
>
>
> Swagger JSON editor + https://swagger.io/specification/. So one Swagger
> Json file can contain the description of all the endpoints.
>
> On Tue, Apr 2, 2019 at 9:19 AM Kevin Keller  wrote:
>
>> I agree.
>>
>> In fact, the whole client side today should be Javascript and just
>> communicate via REST+JWT (even though in the enerprise space you will also
>> need OAUTH2).
>>
>>  The models need to be exposed via REST easiliy and it should be easy to
>> add auth to routes with JWT. Also the REST endpoints once defined, need to
>> generate openapi(swagger) documents automatically.
>>
>> This is much like the JSON route you wanted to go, but with openapi we
>> would be using an actual standard and do not tie ourselves to one
>> Javascript framework and once specific JSON format.
>>
>>  With that we could use something like this:
>> https://api-platform.com/docs/client-generator/ that generates Vue.js or
>> React.js CRUD pages basted on teh openapi documentation for the REST
>> endpoints.
>>
>> On Tue, Apr 2, 2019 at 8:58 AM Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> Th problem with SQLFORM is that different CSS libraries require
>>> different HTML stuctures. It is not as simple as selecting a class or div
>>> vs span. In web2py we have code to deal with bootstrap 2 and 3. We apply
>>> both classes. It is horrible. We should move away from generating html
>>> server side for forms. We should pass a json description and generate it
>>> client side
>>>
>>> On Sunday, 31 March 2019 00:54:23 UTC-7, 黄祥 wrote:

 Backporting SQLFORM, grid and Auth, should not be that complicated,
> although I think we can do better.
>

 sqlform, grid and auth is a great helper to make web2py as rapid
 application development, but please consider some of users who want to use
 another css or js framework.
 perhaps just follow the python principle 'Explicit is better than
 implicit', something like
 sqlform(), sqlform.grid() or form() signature have style='bootstrap',
 or class='something' or tag='div|span|table|tr|td'
 not sure just an idea
 perhaps can stick with the initial idea
 ref:
 https://groups.google.com/forum/#!msg/web2py/89a846kPeGA/nUpNJB_VCAAJ

 best regards,
 stifan

>>> --
>>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-02 Thread Kevin Keller
https://editor.swagger.io/?_ga=2.227432986.689200959.1554189909-55439989.1547630410


Swagger JSON editor + https://swagger.io/specification/. So one Swagger
Json file can contain the description of all the endpoints.

On Tue, Apr 2, 2019 at 9:19 AM Kevin Keller  wrote:

> I agree.
>
> In fact, the whole client side today should be Javascript and just
> communicate via REST+JWT (even though in the enerprise space you will also
> need OAUTH2).
>
>  The models need to be exposed via REST easiliy and it should be easy to
> add auth to routes with JWT. Also the REST endpoints once defined, need to
> generate openapi(swagger) documents automatically.
>
> This is much like the JSON route you wanted to go, but with openapi we
> would be using an actual standard and do not tie ourselves to one
> Javascript framework and once specific JSON format.
>
>  With that we could use something like this:
> https://api-platform.com/docs/client-generator/ that generates Vue.js or
> React.js CRUD pages basted on teh openapi documentation for the REST
> endpoints.
>
> On Tue, Apr 2, 2019 at 8:58 AM Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Th problem with SQLFORM is that different CSS libraries require different
>> HTML stuctures. It is not as simple as selecting a class or div vs span. In
>> web2py we have code to deal with bootstrap 2 and 3. We apply both classes.
>> It is horrible. We should move away from generating html server side for
>> forms. We should pass a json description and generate it client side
>>
>> On Sunday, 31 March 2019 00:54:23 UTC-7, 黄祥 wrote:
>>>
>>> Backporting SQLFORM, grid and Auth, should not be that complicated,
 although I think we can do better.

>>>
>>> sqlform, grid and auth is a great helper to make web2py as rapid
>>> application development, but please consider some of users who want to use
>>> another css or js framework.
>>> perhaps just follow the python principle 'Explicit is better than
>>> implicit', something like
>>> sqlform(), sqlform.grid() or form() signature have style='bootstrap', or
>>> class='something' or tag='div|span|table|tr|td'
>>> not sure just an idea
>>> perhaps can stick with the initial idea
>>> ref:
>>> https://groups.google.com/forum/#!msg/web2py/89a846kPeGA/nUpNJB_VCAAJ
>>>
>>> best regards,
>>> stifan
>>>
>> --
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-04-02 Thread Kevin Keller
I agree.

In fact, the whole client side today should be Javascript and just
communicate via REST+JWT (even though in the enerprise space you will also
need OAUTH2).

 The models need to be exposed via REST easiliy and it should be easy to
add auth to routes with JWT. Also the REST endpoints once defined, need to
generate openapi(swagger) documents automatically.

This is much like the JSON route you wanted to go, but with openapi we
would be using an actual standard and do not tie ourselves to one
Javascript framework and once specific JSON format.

 With that we could use something like this:
https://api-platform.com/docs/client-generator/ that generates Vue.js or
React.js CRUD pages basted on teh openapi documentation for the REST
endpoints.

On Tue, Apr 2, 2019 at 8:58 AM Massimo Di Pierro 
wrote:

> Th problem with SQLFORM is that different CSS libraries require different
> HTML stuctures. It is not as simple as selecting a class or div vs span. In
> web2py we have code to deal with bootstrap 2 and 3. We apply both classes.
> It is horrible. We should move away from generating html server side for
> forms. We should pass a json description and generate it client side
>
> On Sunday, 31 March 2019 00:54:23 UTC-7, 黄祥 wrote:
>>
>> Backporting SQLFORM, grid and Auth, should not be that complicated,
>>> although I think we can do better.
>>>
>>
>> sqlform, grid and auth is a great helper to make web2py as rapid
>> application development, but please consider some of users who want to use
>> another css or js framework.
>> perhaps just follow the python principle 'Explicit is better than
>> implicit', something like
>> sqlform(), sqlform.grid() or form() signature have style='bootstrap', or
>> class='something' or tag='div|span|table|tr|td'
>> not sure just an idea
>> perhaps can stick with the initial idea
>> ref:
>> https://groups.google.com/forum/#!msg/web2py/89a846kPeGA/nUpNJB_VCAAJ
>>
>> best regards,
>> stifan
>>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-03-31 Thread Massimo Di Pierro
Try http://localhost:8000/todoo 

/index


On Saturday, 30 March 2019 19:50:57 UTC-7, 黄祥 wrote:
>
> *step*
> rm -rf ~/learn/python/web3py
> cd ~/learn/python
> git clone https://github.com/web2py/web3py
> cd web3py
> cp -r applications/todo applications/todoo
> python web3py.py applications/
>
> *result on browser*
> Error: 404 Not Found
>
> Sorry, the requested URL 'http://localhost:8000/todoo 
> 
> ' caused an error:
>
> Not found: '/todoo'
>
>
> *result on terminal*
>
> 127.0.0.1 - - [31/Mar/2019 09:47:52] "GET /todoo HTTP/1.1" 404 730
>
> best regards,
> stifan
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-03-31 Thread Massimo Di Pierro


On Saturday, 30 March 2019 02:26:22 UTC-7, 黄祥 wrote:
>
> on github :
>
>- request, response objects are from bottle (
>https://bottlepy.org/docs/dev/)
>
> what is different web2py and bottle in terms of request and response ? 
> plus minus between it?
>

slightly different syntax. bottle request is faster if accessed often.

>
>- unlike web2py, web3py does not use custom import or eval
>
> is custom import is same like import from modules folders in web2py app ?
>

custom import makes sure that for every app web2py first looks in the 
app/modules folder. This causes some modules to break if they are designed 
to only work when pip installed. the new design should have these problem 
because does not mess with imports (at least not at the same level)
 

> is eval same like in python ?
>

we do not use eval but in web2py we execute modules instead of importing 
them. This is not the case in web3py.
 

> ref:
> http://web2py.com/books/default/chapter/29/02/the-python-language#exec-eval
>
>- dynamic module reloading is only partially supported
>
> then what about dynamic module reload in this term ?
>

In web2py we do not realod the modules. we reimport them at every request. 
this causes a performance penalty and is only needed in development.
web3py (current version) uses bottle.run(reload=True) which reloads the 
module if they change but crashes the whole thing if there is an import 
error. There is a better way and I am working on it.
 

>
> thanks and best regards,
> stifan
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-03-30 Thread 黄祥
*step*
rm -rf ~/learn/python/web3py
cd ~/learn/python
git clone https://github.com/web2py/web3py
cd web3py
cp -r applications/todo applications/todoo
python web3py.py applications/

*result on browser*
Error: 404 Not Found

Sorry, the requested URL 'http://localhost:8000/todoo' caused an error:

Not found: '/todoo'


*result on terminal*

127.0.0.1 - - [31/Mar/2019 09:47:52] "GET /todoo HTTP/1.1" 404 730

best regards,
stifan

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-03-30 Thread 黄祥
on github :

   - request, response objects are from bottle (
   https://bottlepy.org/docs/dev/)

what is different web2py and bottle in terms of request and response ? plus 
minus between it?

   - unlike web2py, web3py does not use custom import or eval

is custom import is same like import from modules folders in web2py app ?
is eval same like in python ?
ref:
http://web2py.com/books/default/chapter/29/02/the-python-language#exec-eval

   - dynamic module reloading is only partially supported

then what about dynamic module reload in this term ?

thanks and best regards,
stifan

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-03-29 Thread José Luis Redrejo
El vie., 29 mar. 2019 a las 5:12, Massimo Di Pierro (<
massimo.dipie...@gmail.com>) escribió:

> My thought exactly.
>
>
I also fully agree.
Very excited with the new features.

Also, I see the problems I reported yesterday have been solved in the git
repository. Now we can begin to really play with it.
José L.




> On Thursday, 28 March 2019 18:46:47 UTC-7, Joe Barnhart wrote:
>>
>> I agree that back porting web2py code should be straightforward (after
>> all, it's not rocket science :-D).  But maybe we should revisit those
>> modules and pare them down to minimalist proportions.  I really need Auth,
>> complete with user roles and groups, but there's probably a better way to
>> minimize/abstract and provide a growth path.
>>
>> Plus, with py3 and web2py in hand, its not like there's a fire that needs
>> putting out.
>>
>> -- Joe
>>
>>
>> On Thursday, March 28, 2019 at 2:16:15 AM UTC-7, Massimo Di Pierro wrote:
>>>
>>> I know this comes up once in a while but ...
>>>
>>> https://github.com/web2py/web3py
>>>
>>> what do you think?
>>>
>>> It is very preliminary but I will have an admin soon.
>>> Backporting SQLFORM, grid and Auth, should not be that complicated,
>>> although I think we can do better.
>>>
>>> Massimo
>>>
>>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web3py again....

2019-03-28 Thread Kevin Keller
I like the general direction of it.
Auth and sqlform backported would of course be great.

With bottle in the middle we can tap into the bottle community extensions
but also gain extra flexibility..

Combined with web2py sqlform and Auth etc could be a real winner

On Fri, 29 Mar 2019, 02:46 Joe Barnhart,  wrote:

> I agree that back porting web2py code should be straightforward (after
> all, it's not rocket science :-D).  But maybe we should revisit those
> modules and pare them down to minimalist proportions.  I really need Auth,
> complete with user roles and groups, but there's probably a better way to
> minimize/abstract and provide a growth path.
>
> Plus, with py3 and web2py in hand, its not like there's a fire that needs
> putting out.
>
> -- Joe
>
>
> On Thursday, March 28, 2019 at 2:16:15 AM UTC-7, Massimo Di Pierro wrote:
>>
>> I know this comes up once in a while but ...
>>
>> https://github.com/web2py/web3py
>>
>> what do you think?
>>
>> It is very preliminary but I will have an admin soon.
>> Backporting SQLFORM, grid and Auth, should not be that complicated,
>> although I think we can do better.
>>
>> Massimo
>>
>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.