[web2py] web2py 2.17.1

2018-08-05 Thread Massimo Di Pierro
Hello everybody,

I released pyDAL 18.08 and web2py 2.17.1
They mostly contain bug fixes as well as better support for python 3 and 
bootstrap 4 by default.
Thanks to all those who contributed!

Please check them out and report any issue with them.

I have a been a little slow checking this group because of lots of 
traveling but I will do my best to catch up. :-)

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.


[web2py] Re: Interesting Project

2018-08-05 Thread Massimo Di Pierro
curious. what features do you like that we could include in web2py?

On Thursday, 12 July 2018 16:13:42 UTC-7, greenpoise wrote:
>
> Been jumping around different python frameworks and stumbled upon Websauna 
>  . Its built on top of Pyramid (Pylons). I share 
> it here because I thought it borough a few things from web2py (or so it 
> looks like) and perhaps it has a few features web2py can borough from. Dont 
> get me wrong, I struggle programming period. I try but I struggle but I 
> find that I struggle getting the bootstrap part of web2py when I compare it 
> to the others. Anyway, just sharing.
>
>
> cheers
>

-- 
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.


[web2py] Re: auto save feature

2018-08-05 Thread Massimo Di Pierro
I would not automate this. I do not see a one size fits all for this. The 
fact is that partial fills may not pass validation. I would instead create 
a pure JS function that periodically save the entire form in JSON to a TMP 
table.

On Sunday, 15 July 2018 06:05:22 UTC-7, Diego Tostes wrote:
>
> Hi,
>
> i have a table with more than 60 fields. Is it possible to create a "auto 
> save" feature with web2py Built-in methods to allowing users to have data 
> saved while the process of filling the form?
>
> rgds
>
> Diego
>

-- 
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.


[web2py] Re: Beginning noob - link issue

2018-08-05 Thread Massimo Di Pierro

Fixed.

On Monday, 16 July 2018 15:07:55 UTC-7, Anthony wrote:
>
> No, looks like something is broken.
>
> On Monday, July 16, 2018 at 3:18:44 PM UTC-4, ju...@us.ibm.com wrote:
>>
>> This page has a link to try out web2py  
>> http://web2py.com/init/default/what  at this location 
>> http://www.web2py.com/demo_admin  which throws this error:
>> Internal error Ticket issued: demo_admin/72.69.89.58.2018-07-15.15-38-34 
>> 
>> 
>> which when resolved yields this error  Admin is disabled because insecure 
>> channel
>> So I try  ssl  (https://www.web2py.com/admin/default/index) which leads 
>> me to the admin interface.  That requires a password.
>>
>> Is this the expected behavior of this demo application ?
>> Thanks 
>>
>

-- 
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.


[web2py] Re: Bot sends bad POST and triggers ValueError: Invalid boundary in multipart form: ''

2018-08-05 Thread Massimo Di Pierro
Can you show an example of the body of the post that causes the problem?

On Tuesday, 17 July 2018 06:43:35 UTC-7, Lisandro wrote:
>
> Hi there! I'm just reporting this situation in case it's a bug, I'm not 
> sure.
>
> I have a public webpage (no login required), and from time to time I see 
> this error: 
> ValueError: Invalid boundary in multipart form: ''
>
> The error is produced by a bot that sends a bad POST to an URL that 
> doesn't even expect a POST (it's just a public URL that shows a list of 
> news, and it is cached). 
> But as my application access request.vars, when the bot sends that POST, I 
> see this error traceback:
>
> Traceback (most recent call last):
>   File "/var/www/medios/gluon/restricted.py", line 219, in restricted
> exec(ccode, environment)
>   File "applications/informatesalta/compiled/controllers.default.index.py", 
> line 4, in 
>   File "applications/informatesalta/modules/globales.py", line 2108, in 
> get_publicidades_response
> layout = request.vars.layout or ''
>   File "/var/www/medios/gluon/globals.py", line 314, in vars
> self.parse_all_vars()
>   File "/var/www/medios/gluon/globals.py", line 285, in parse_all_vars
> for key, value in iteritems(self.post_vars):
>   File "/var/www/medios/gluon/globals.py", line 306, in post_vars
> self.parse_post_vars()
>   File "/var/www/medios/gluon/globals.py", line 242, in parse_post_vars
> dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
>   File "/usr/lib64/python2.7/cgi.py", line 507, in __init__
> self.read_multi(environ, keep_blank_values, strict_parsing)
>   File "/usr/lib64/python2.7/cgi.py", line 621, in read_multi
> raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,)
> ValueError: Invalid boundary in multipart form: ''
>
>
>
> Notice the error is triggered in gluon/globals.py, specifically in 
> "parse_all_vars" function.
> What can I do in order to avoid the ticket error?
>
> 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why not to mention support to Python3 on the official sites main page?

2018-08-05 Thread Massimo Di Pierro
I agree. We should mention it. We should also say that "web2py runs with 
pyhton 3 BUT web2py apps created with python 2 require web2py running under 
python 2 and apps created using python 3 requires web2py running python 3. 
They cannot be mixed."

To some this will break the plug and play if they are not careful. Maybe we 
should create a mechanism to automatically determine which version of 
python was used to create an app.

On Friday, 20 July 2018 18:53:08 UTC-7, Antonio Salazar wrote:
>
> I try to, as this is the only py2 app I support, but these months I've 
> been swamped with work. I'll resume testing in September.
>
> On Friday, July 20, 2018 at 9:06:46 AM UTC-5, Ari Lion BR Sp wrote:
>>
>> Hi Antonio Salazar,
>>
>> But if we do not test, we would not have how to fix BUGs. Maybe from 
>> times to times test your whole app on Python3 and report bugs...
>>
>> Thanks
>> Ari - Brazil
>>
>>
>>
>> Em quinta-feira, 19 de julho de 2018 19:38:15 UTC-3, Antonio Salazar 
>> escreveu:
>>>
>>> Last April I downloaded the latest official stable release (2017-11-14) 
>>> and adjusted all my code for Python 3. Unfortunately, two serious bugs in 
>>> the streamer and scheduler made return to Python 2.
>>>
>>> Both bugs are fixed in Github, but I'm wary of trying it again until 
>>> it's better tested on Python 3. Since no new stable release has been made 
>>> in eight months, and the current one still has those bugs, I get the 
>>> impression it's not stable yet.
>>>
>>>
>>> On Monday, July 16, 2018 at 7:55:01 AM UTC-5, Ari Lion BR Sp wrote:

 Hi,

 I wonder here why Python3 support is not mentioned at the official 
 web2py's website?

 It is a very important feature which was not enough publicized, in my 
 opinion.
 It would improove marketing for the framework at least at our Country, 
 Brazil.
 Peoples colective memory here tends to remeber web2py only suports 
 python2.


 Thanks,
 Ari

>>>

-- 
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: Issues getting web2py to work.

2018-08-05 Thread Massimo Di Pierro
Fantastic! We are here to help.

Massimo

On Wednesday, 25 July 2018 05:46:36 UTC-7, Ben Duncan wrote:
>
> Thanks, Figured that out late yesterday. 
> I've gone ahead and purchased the book "web2py complete reference manual - 
> 5th edition".
> I've pretty much decided that web2py will be our framework for the 
> criminal accounting system for our state supreme court.
>
> Anyway, I will probably have LOTS and LOTS of questions along the way.
>
> On Tue, Jul 24, 2018 at 3:07 PM, Anthony  wrote:
>
>> You'll need to run web2py with Python 2.7 (the specific issue below is 
>> that the DAL code includes a dictionary comprehension, which is only 
>> supported in Python 2.7+).
>>
>> Anthony
>>
>>
>> On Tuesday, July 24, 2018 at 4:03:13 PM UTC-4, Ben Duncan wrote:
>>>
>>> Redhack 6.9
>>> Python 2.6.6
>>>
>>> Installed web2py source.
>>> Ran the command:
>>> >python web2py.py
>>> got the message:
>>>
>>> Traceback (most recent call last):
>>>   File "web2py.py", line 21, in 
>>> import gluon.widget
>>>   File "/data/web2py/web2py/gluon/__init__.py", line 23, in 
>>> import pydal
>>>   File "/data/web2py/web2py/gluon/packages/dal/pydal/__init__.py", line 
>>> 3, in 
>>> from .base import DAL
>>>   File "/data/web2py/web2py/gluon/packages/dal/pydal/base.py", line 145, 
>>> in 
>>> from .objects import Table, Field, Rows, Row, Set
>>>   File "/data/web2py/web2py/gluon/packages/dal/pydal/objects.py", line 
>>> 385
>>> return [{key: noncallable(getattr(field, key)) for key in keys}
>>>
>>> Any Ideas ?
>>>
>>> Thanks
>>>
>>> Ben Duncan   ^
>>>
>>> -- 
>> 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.


[web2py] New web2py/pydal feautures for scalability

2018-08-05 Thread Massimo Di Pierro
Some of you may not like using the filesystem for strong data. In 
particular that is not a good solution for scalability. Now you can do:

myconf = AppConfig(reload=True)
# always store sessions in cookies
session.connect(request, response, cookie_key=myconf.get('app.cookie_key'))
# store metadata tables in db
db = DAL(myconf.get('db.uri'),
 pool_size=myconf.get('db.pool_size'),
 migrate_enabled=request.is_local,  # trigger a migration when 
called locally
 fake_migrate_all=request.is_local and request.vars._fake, # 
trigger a fake migration when passing ?_fake=1
 adapter_args=dict(migrator=InDBMigrator), # store metadata tables 
in db itself
 check_reserved=['all'])

Notice that if you change your code to do this in an exiting app, you must 
run a fake migration.




-- 
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.