web2py 1.95.1 and open issues

Showing 21-52 of 52 messages
web2py 1.95.1 and open issues mdipierro 4/25/11 7:06 AM
Hello everybody,

web2py 1.95.1 is out with lots of improvements and bug fixes:
## 1.95.1
- Google MySQL support (experimental)
- pip support, thanks lifeeth
- better setup_exe.py, thanks meredyk
- importved pyfpdf
- domain check in email_auth.py, thanks Gyuris
- added change_password_onvalidation and change_password_onaccept
- DAL(...,migrate_enabled=True)
- login_methods/loginza.py, thanks Vladimir
- bpython shell support, thanks Arun
- request.uuid and response.uuid (for a future toolbar)
- db._timings contains database query timing info
- efficient db(...).isempty()
- setup-web2py-nginx-uwsgi-ubuntu.sh
- Many bug fixes, thanks Jonathan

Please check it out.

I have many pending patches still to be applied and tested:
- those documented in googlecode issues
- the new custom_import

Is there any outstanding issue that has not been submitted as an issue to googlecode?

Massimo


Re: [web2py] web2py 1.95.1 and open issues 黄祥 4/25/11 7:19 AM
great job, massimo n the others, i've download n test it. thank you so much.
Re: [web2py] web2py 1.95.1 and open issues Praneeth 4/25/11 7:33 AM
Also available at the cheese shop

To install:

pip install web2py


To upgrade:

pip install web2py --upgrade


--
Praneeth
IRC: lifeeth

Re: [web2py] web2py 1.95.1 and open issues Vasile Ermicioi 4/25/11 7:37 AM
hi,

thank you Massimo, 

please tell us more about  Google MySQL

does it support GROUP BY and JOINs ?

I need to know that for a library I am working on...
Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/25/11 7:52 AM
I cannot tell you much because Google has not yet released the service
publicly. I can tell you I have tested it (they gave me early access
for the test) and it supports normal mysql syntax including GROUP BY,
JOINs, transactions and web2py automatic migrations.

We should just call it GoogleSQL since although the syntax is MySQL
compatible, I do not think is exactly MySQL under the hood.

I will post instructions as soon as they go public with this.
Basically we will be able to deploy on GAE any web2py app without ANY
change. Additionally we will be able to use GoogleSQL for some tables
and GoogleNoSQL for other tables at the same time, in the same app.

Massimo
Re: [web2py] Re: web2py 1.95.1 and open issues Gilson Filho 4/25/11 8:01 AM
I was wondering if in future versions, will have support for models and controllers in subfolders. For example:

+-models
+--model01
+--------model01.py
+--model02.py
+--model03.py
_____________________________________________
Gilson Filho
Web Developer
http://gilsondev.com



2011/4/25 Massimo Di Pierro <massimo....@gmail.com>

Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/25/11 8:08 AM
this has been discussed and I support it. We just have to agree on the
exact syntax since we want to allow dependencies in non-alphabetical
order and conditional execution.

On Apr 25, 10:01 am, Gilson Filho <cont...@gilsondev.com> wrote:
> I was wondering if in future versions, will have support for models and
> controllers in subfolders. For example:
>
> +-models
> +--model01
> +--------model01.py
> +--model02.py
> +--model03.py
> _____________________________________________
> *Gilson Filho*
> *Web Developerhttp://gilsondev.com*
>
> 2011/4/25 Massimo Di Pierro <massimo.dipie...@gmail.com>
Re: [web2py] web2py 1.95.1 and open issues Kenneth 4/25/11 8:35 AM
> - importved pyfpdf

Is there any more info about the improved pyfpdf?


Kenneth

> - domain check in email_auth.py, thanks Gyuris
> - added change_password_onvalidation and change_password_onaccept
> - DAL(...,migrate_enabled=True)
> - login_methods/loginza.py, thanks Vladimir
> - bpython shell support, thanks Arun
> - request.uuid and response.uuid (for a future toolbar)
> - db._timings contains database query timing info
> - efficient db(...).isempty()
> - setup-web2py-nginx-uwsgi-ubuntu.sh
> - Many bug fixes, thanks Jonathan
>
> Please check it out.
>
> I have many pending patches still to be applied and tested:
> - those documented in googlecode issues
> - the new custom_import
>
> Is there any outstanding issue that has not been submitted as an issue to googlecode?
>
> Massimo
>
>

Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/25/11 10:10 AM
Look up the pyfpdf project on google code. I upgraded on March 30.

On Apr 25, 10:35 am, Kenneth Lundström <kenneth.t.lundst...@gmail.com>
wrote:
Re: web2py 1.95.1 and open issues Oscar 4/25/11 11:18 PM
I upgraded to this version, then plugin_wiki is broken, it return an error at menu.py sating that attribute str has not xml method.

Oscar.
Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/26/11 5:25 AM
In you menu you have...

URL(...).xml() but should be URL(...) without .xml().
Re: web2py 1.95.1 and open issues Oscar 4/26/11 6:05 AM
Why happened it?

Did you changed some thing in the last update?

Thank you,

Oscar.


On 26 abr, 08:25, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
Re: web2py 1.95.1 and open issues Oscar 4/26/11 6:08 AM
That solved the issue :-)

I removed .xml from every "URL" object in that line.

Oscar.


On 26 abr, 08:25, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
Re: web2py 1.95.1 and open issues Anthony 4/26/11 6:23 AM
On Tuesday, April 26, 2011 9:05:49 AM UTC-4, Oscar wrote:
Why happened it?

Did you changed some thing in the last update?
 
Back in September, URL was changed to return an XML object, giving it an xml() method (see http://code.google.com/p/web2py/source/detail?r=f1b6270440724180964c385789125b7c0baaab0e&path=/gluon/html.py). However, that created a bug whereby URL query strings were not being properly escaped, so the change was recently reverted (see http://code.google.com/p/web2py/source/detail?r=7f8433889c2ec409b721783f0159a77d83153d0b). So, there's no more xml() method.
 
Anthony
Re: web2py 1.95.1 and open issues Ray (a.k.a. Iceberg) 4/27/11 4:33 AM
On Apr 25, 10:06 pm, Massimo Di Pierro <mdipie...@cs.depaul.edu>
wrote:
> Hello everybody,
>
> web2py 1.95.1 is out with lots of improvements and bug fixes:
> - ......
>
> Please check it out.
>
> I have many pending patches still to be applied and tested:
> - those documented in googlecode issues
> - the new custom_import
>
> Is there any outstanding issue that has not been submitted as an issue to googlecode?
>
> Massimo


Nice job. I start using it now, so far so good.

But seems the latest suggestion for issue 221 is not in yet?
http://code.google.com/p/web2py/issues/detail?id=221

Regards,
Iceberg
Tr.lời: Re: web2py 1.95.1 and open issues IVINH 4/27/11 5:17 AM
Hi,
In new version: crud.update work only with deletable=False?

Re: Tr.lời: Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/27/11 5:21 AM
I do not think so. It was not touched. Can you provide an example of
the problem?
Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues IVINH 4/27/11 6:34 PM
I have this error when set deletable=True:

  File "E:\web2py\gluon\globals.py", line 133, in <lambda>
self._caller = lambda f: f()
File "E:\web2py\gluon\tools.py", line 2335, in f
return action(*a, **b)
File "E:/web2py/applications/init/controllers/plugin_admin.py", line 142, in update
if form.accepts(request.vars, session):
File "E:\web2py\gluon\sqlhtml.py", line 1200, in accepts
self.table._db(self.table.id == self.record.id).update(**fields)
File "E:\web2py\gluon\dal.py", line 5173, in update
fields = self.db[tablename]._listify(update_fields,update=True)
File "E:\web2py\gluon\dal.py", line 4464, in _listify
raise SyntaxError, 'Field %s does not belong to the table' % name
SyntaxError: Field delete_this_record does not belong to the table

Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues IVINH 4/27/11 6:54 PM
My controller:

def crud1():
    form = crud.update(db.container,request.args(0),deletable=True)
    if form.accepts(request.vars, session):
        pass
    return dict(form=form)

I have web2py 1.95.1, Python 2.7 & OS Win7 Home
Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/27/11 8:52 PM
Can you help me debug this?

Do you get the error when you check the "delete" box or when you do
not?

In line 1093 of gluon/sqlhtml.py

can you change

   if requested_delete and self.custom.deletable

into

   if requested_delete and self.custom.deletable!=''

do you still get the error below?
Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues IVINH 4/28/11 12:00 AM
I get only the error when not check the "delete" box.
And not error when remove :
if form.accepts(request.vars, session):
        pass
I change in line 1093 of gluon/sqlhtml.py, but not work.


Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Falko Delarue 4/28/11 2:06 AM
I get an unkown error for every ticket that is created by my
application
I can see the print out of the error trackeback in the shell i started
web2py in
also the ticked pickle files are broken, when i open the admin to view
the tickets i get
Traceback (most recent call last):
  File "/home/fkrause/Downloads/tmp/wp/web2py/gluon/restricted.py",
line 181, in restricted
    exec ccode in environment
  File "/home/fkrause/Downloads/tmp/wp/web2py/applications/admin/
controllers/default.py", line 1188, in <module>
  File "/home/fkrause/Downloads/tmp/wp/web2py/gluon/globals.py", line
133, in <lambda>
    self._caller = lambda f: f()
  File "/home/fkrause/Downloads/tmp/wp/web2py/applications/admin/
controllers/default.py", line 1033, in errors
    error = pickle.load(open(fullpath, 'r'))
  File "/usr/lib/python2.6/pickle.py", line 1370, in load
    return Unpickler(file).load()
  File "/usr/lib/python2.6/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.6/pickle.py", line 880, in load_eof
    raise EOFError
EOFError

this only is the case for my older applications, i cannot reproduce it
with a newly created application
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Falko Delarue 4/28/11 2:11 AM
after deleting my app step by step i found it
i had

from gluon.tools import *

in one of my model files
this breaks the ticket generation!
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Falko Delarue 4/28/11 2:32 AM
ok this cant be correct
so i started importing things that were missing

from gluon.tools import Auth #ok
from gluon.tools import Crud #ok
from gluon.tools import Service #ok
from gluon.tools import Mail<-here it starts creating corrupt error
tickets again
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Falko Delarue 4/28/11 3:31 AM
in a fresh mercurial checkout i commented out
jn = os.path.join in one of my models and the error messages were
normal again

in version 1.95.1 i commented out #mail = Mail()
and i had normal error messges again, complaining that mail is unknow
so i changed
auth.settings.mailer = mail
to
auth.settings.mailer = None

and the error messages are unknown again and only appear in the shell
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Falko Delarue 4/28/11 3:32 AM
in a fresh mercurial checkout i commented out
jn = os.path.join in one of my models and the error messages were
normal again

in version 1.95.1 i commented out #mail = Mail()
and i had normal error messges again, complaining that mail is unknow
so i changed
auth.settings.mailer = mail
to
auth.settings.mailer = None

and the error messages are unknown again and only appear in the shell
i am stumbeling in the dark, what is going on here?

On Apr 28, 11:32 am, selecta <gr...@delarue-berlin.de> wrote:
> ok this cant be correct
> so i started importing things that were missing
>
> from gluon.tools import Auth #ok
> from gluon.tools import Crud #ok
> from gluon.tools import Service #ok
> from gluon.tools import Mail<-here it starts creating corrupt error
> tickets again
>
> On Apr 28, 11:11 am, selecta <gr...@delarue-berlin.de> wrote:
>
>
>
> > after deleting my app step by step i found it
> > i had
>
> > from gluon.tools import *
>
> > in one of my model files
> > this breaks the ticket generation!
>
> > On Apr 28, 11:06 am, selecta <gr...@delarue-berlin.de> wrote:
>
> > > I get an unkown error for every ticket that is created by my
> > > application
> > > I can see the print out of the error trackeback in the shell i started
> > > web2py in
> > > also the ticked pickle files are broken, when i open the admin to view
> > > the tickets i get
> > > Traceback (most recent call last):
> > >   File "/home/fkrause/Downloads/tmp/wp/web2py/gluon/restricted.py",
> > > line 181, in restricted
> > >     exec ccode in environment
> > >   File "/home/fkrause/Downloads/tmp/wp/web2py/applications/admin/
> > > controllers/default.py", line 1188, in <module>
> > >   File "/home/fkrause/Downloads/tmp/wp/web2py/gluon/globals.py", line
> > > 133, in <lambda>
> > >     self._caller = lambda f: f()
> > >   File "/home/fkrause/Downloads/tmp/wp/web2py/applications/admin/
> > > controllers/default.py", line 1033, in errors
> > >     error = pickle.load(open(fullpath, 'r'))
> > >   File "/usr/lib/python2.6/pickle.py", line 1370, in load
> > >     return Unpickler(file).load()
> > >   File "/usr/lib/python2.6/pickle.py", line 858, in load
> > >     dispatch[key](self)
> > >   File "/usr/lib/python2.6/pickle.py", line 880, in load_eof
> > >     raise EOFError
> > > EOFError
>
> > > this only is the case for my older applications, i cannot reproduce it
> > > with a newly created application
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/28/11 6:35 AM
Can you please add

print request.vars # <<< this line
if form.accepts(request.vars, session):
        pass

and tell me what it prints if submit without checking the "delete"
box, when you would get the error?

On Apr 28, 2:00 am, toan75 <toa...@gmail.com> wrote:
> I get only the error when not check the "delete" box.
> And not error when remove :
> if form.accepts(request.vars, session):
>         pass
> I change in line 1093 of gluon/sqlhtml.py, but not work.
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Massimo Di Pierro 4/28/11 6:35 AM
What do you mean by corrupted error tickets? Do you have a traceback?
Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues IVINH 4/28/11 8:38 AM
That print:
<Storage {'name': 'box project home', 'object': '', '_formname': 'container/800'
, 'content': '', 'div': 'midle', 'id': '800', 'position': '100', '_formkey': 'bd
2630f58397518b338e318405ef4892', 'type': 'link', 'folder': '19', '_next': ''}>
Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues IVINH 4/28/11 8:39 AM
My DB:

db.define_table('container',
    Field('folder','reference folder',requires=IS_NULL_OR(IS_IN_DB(db,'folder.id','%(name)s'))),
    Field('object','reference object',requires=IS_NULL_OR(IS_IN_DB(db,'object.id','%(name)s'))),
    Field('name',default=''),
    Field('div',default='midle',requires=IS_IN_SET(plugin_admin_setting['div'])),
    Field('position','integer',default=100),
    Field('content','text',default='<div id="div_default">{{=plugin_admin.write_object(context)}}</div>'),
    Field('active','boolean',default=True),
    Field('type',default='folder',requires=IS_IN_SET(['folder','content','link'])),
    Field('created_by','integer',default=auth.user_id or 1,writable=False,readable=False),
    Field('created_on','datetime',default=request.now,writable=False,readable=False),
    migrate=plugin_admin_setting['migrate'])
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues Falko Delarue 4/28/11 10:55 AM
> What do you mean by corrupted error tickets? Do you have a traceback?
all I get is an unknow error, a printout in the shell and a ticket
file
if i try to access this ticket file in the appadmin i get the
traceback that i posted before
Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues ls1 5/16/11 4:46 AM
I confirm the problem. Had the same errors.
Solution for user: delete all non-tickets files from errors directory.
Any non-ticket file in directory generates error and links like

http://127.0.0.1:8000/admin/default/errors/<appname>

does not work.

To preserve directory structure in my application hg repository I used
to have one empty file in each directory.
Now I had to delete this file, didn't like it.