web2py 1.95.1 and open issues

瀏覽次數:165 次
跳到第一則未讀訊息

Massimo Di Pierro

未讀,
2011年4月25日 上午10:06:102011/4/25
收件者:web2py-users
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


Stifan Kristi

未讀,
2011年4月25日 上午10:19:362011/4/25
收件者:web...@googlegroups.com
great job, massimo n the others, i've download n test it. thank you so much.

Praneeth Bodduluri

未讀,
2011年4月25日 上午10:33:582011/4/25
收件者:web...@googlegroups.com
Also available at the cheese shop

To install:

pip install web2py


To upgrade:

pip install web2py --upgrade


--
Praneeth
IRC: lifeeth

Vasile Ermicioi

未讀,
2011年4月25日 上午10:37:272011/4/25
收件者:web...@googlegroups.com
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...

Massimo Di Pierro

未讀,
2011年4月25日 上午10:52:322011/4/25
收件者:web2py-users
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

Gilson Filho

未讀,
2011年4月25日 上午11:01:102011/4/25
收件者:web...@googlegroups.com
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>

Massimo Di Pierro

未讀,
2011年4月25日 上午11:08:312011/4/25
收件者:web2py-users
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>

Kenneth Lundström

未讀,
2011年4月25日 上午11:35:552011/4/25
收件者:web...@googlegroups.com
> - importved pyfpdf

Is there any more info about the improved pyfpdf?


Kenneth

Massimo Di Pierro

未讀,
2011年4月25日 下午1:10:542011/4/25
收件者:web2py-users
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:

Oscar

未讀,
2011年4月26日 凌晨2:18:152011/4/26
收件者:web...@googlegroups.com
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.

Massimo Di Pierro

未讀,
2011年4月26日 上午8:25:002011/4/26
收件者:web2py-users
In you menu you have...

URL(...).xml() but should be URL(...) without .xml().

Oscar

未讀,
2011年4月26日 上午9:05:492011/4/26
收件者:web2py-users
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:

Oscar

未讀,
2011年4月26日 上午9:08:192011/4/26
收件者:web2py-users
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:

Anthony

未讀,
2011年4月26日 上午9:23:462011/4/26
收件者:web...@googlegroups.com
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

Iceberg

未讀,
2011年4月27日 清晨7:33:362011/4/27
收件者:web2py-users
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

toan75

未讀,
2011年4月27日 上午8:17:202011/4/27
收件者:web...@googlegroups.com
Hi,
In new version: crud.update work only with deletable=False?

Massimo Di Pierro

未讀,
2011年4月27日 上午8:21:412011/4/27
收件者:web2py-users
I do not think so. It was not touched. Can you provide an example of
the problem?

toan75

未讀,
2011年4月27日 晚上9:34:572011/4/27
收件者:web...@googlegroups.com
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

toan75

未讀,
2011年4月27日 晚上9:54:042011/4/27
收件者:web...@googlegroups.com
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

Massimo Di Pierro

未讀,
2011年4月27日 晚上11:52:212011/4/27
收件者:web2py-users
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?

toan75

未讀,
2011年4月28日 凌晨3:00:552011/4/28
收件者:web...@googlegroups.com
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.


selecta

未讀,
2011年4月28日 清晨5:06:232011/4/28
收件者:web2py-users
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

selecta

未讀,
2011年4月28日 清晨5:11:102011/4/28
收件者:web2py-users
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!

selecta

未讀,
2011年4月28日 清晨5:32:052011/4/28
收件者:web2py-users
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

selecta

未讀,
2011年4月28日 清晨6:31:522011/4/28
收件者:web2py-users
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

selecta

未讀,
2011年4月28日 清晨6:32:372011/4/28
收件者:web2py-users
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:

Massimo Di Pierro

未讀,
2011年4月28日 上午9:35:022011/4/28
收件者:web2py-users
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?

Massimo Di Pierro

未讀,
2011年4月28日 上午9:35:442011/4/28
收件者:web2py-users
What do you mean by corrupted error tickets? Do you have a traceback?

toan75

未讀,
2011年4月28日 上午11:38:182011/4/28
收件者:web...@googlegroups.com
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': ''}>

toan75

未讀,
2011年4月28日 上午11:39:142011/4/28
收件者:web...@googlegroups.com
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'])

selecta

未讀,
2011年4月28日 下午1:55:262011/4/28
收件者:web2py-users
> 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

ls1

未讀,
2011年5月16日 清晨7:46:362011/5/16
收件者:web2py-users
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.
回覆所有人
回覆作者
轉寄
0 則新訊息