Re: [web2py:37117] Re: Ngram based search. App

2009-12-12 Thread Thadeus Burgess
SequenceMatcher is for comparing one file to another file... and would be god awefull if you were to try and index an entire database of content. I just glanced at SequenceMatcher however, and it does not seem to suit my needs. The biggest limitation I would say would be finding the right "min-sim

[web2py:37116] Re: HELP with new DAL

2009-12-12 Thread mdipierro
When finished (not yet) it would be nice to run some benchmarks. Massimo On Dec 13, 1:00 am, mdipierro wrote: > oops. I always tested the new DAL isolated. I forgot to integrate it > with the rest of web2py. > Done now. Please try again. > > Massimo > > On Dec 13, 12:23 am, "mr.freeze" wrote: >

[web2py:37115] Re: HELP with new DAL

2009-12-12 Thread mdipierro
oops. I always tested the new DAL isolated. I forgot to integrate it with the rest of web2py. Done now. Please try again. Massimo On Dec 13, 12:23 am, "mr.freeze" wrote: > I updated and get this now: > > Traceback (most recent call last): > File "C:\\web2py\\gluon\\main.py", line 551, in wsgibas

[web2py:37114] Re: HELP with new DAL

2009-12-12 Thread mr.freeze
I updated and get this now: Traceback (most recent call last): File "C:\\web2py\\gluon\\main.py", line 551, in wsgibase SQLDB.close_all_instances(SQLDB.rollback) AttributeError: type object 'SQLDB\' has no attribute 'close_all_instances\' On Dec 12, 11:27 pm, mdipierro wrote: > I am rewriting t

[web2py:37113] HELP with new DAL

2009-12-12 Thread mdipierro
I am rewriting the DAL to make more modular. 75% is done and it is in trunk. Please take a look. I need one official tester for each supported database backend (except sqlite since I can do that) Any volunteer? Now every supported backend has an adapter and most funcitons are delegated to the ad

[web2py:37112] Re: Custom Form Element For Crud.Create

2009-12-12 Thread mdipierro
I do not understand what you are tryng to do. If the postid is already in the URL (request.args(0)) why to you put it in the form? My best guess is that you are trying to do this: def view(): postid = request.args(0) ## post.body = post.body.replace("\n", "") WARNING db.comment.p

[web2py:37111] Re: new DAL('gae')

2009-12-12 Thread mdipierro
At some point GAE added support for the IN operator. I do not know when but when I found out I added it (belongs maps to IN). Notice that this is not the same as LIKE. Massimo On Dec 12, 6:19 pm, Richard wrote: > how did you add belongs support for GAE? I remember in a previous > discussion this

[web2py:37110] Re: multiple SQLForms and rows datetime problem

2009-12-12 Thread mr.freeze
If you can get away with just a date, here are two options: http://www.web2pyslices.com/main/slices/take_slice/22 http://www.web2pyslices.com/main/slices/take_slice/25 The latter should be easy to modify to include the time. Hope that helps. On Dec 12, 7:36 pm, Mikey J wrote: > So I very much n

[web2py:37109] Re: multiple SQLForms and rows datetime problem

2009-12-12 Thread Mikey J
So I very much need help to solve this. custom widget tutor could also help. On 13 joulu, 02:31, "mr.freeze" wrote: > You're not doing anything wrong. It's either a problem with the > calendar.js plugin or the way it is implemented in web2py_ajax.html. > > On Dec 12, 5:49 pm, Mikey J wrote: > >

[web2py:37108] Re: multiple SQLForms and rows datetime problem

2009-12-12 Thread mr.freeze
You're not doing anything wrong. It's either a problem with the calendar.js plugin or the way it is implemented in web2py_ajax.html. On Dec 12, 5:49 pm, Mikey J wrote: > This problem comes also with default view.. and Firefox, IE7..  Too > depressed to try opera ;) > > On 13 joulu, 00:45, Mikey J

[web2py:37107] Re: Custom Form Element For Crud.Create

2009-12-12 Thread Mengu
so far, i have managed to do this: def view(): postid = request.args(0) post = db(db.post.id == postid).select()[0] post.body = post.body.replace("\n", "") commentform = crud.create(db.comment, onaccept=_setPostId) commentform[0].append(XML('')) return dict(post=post, comme

[web2py:37106] Re: new DAL('gae')

2009-12-12 Thread Richard
how did you add belongs support for GAE? I remember in a previous discussion this was considered not possible/practical: http://code.google.com/p/web2py/issues/detail?id=56&can=1 On Dec 12, 4:42 pm, mdipierro wrote: > I have re-factored a lot of code in gluon/contrib/gql.py in order to > make i

[web2py:37105] Re: Ngram based search. App

2009-12-12 Thread Richard
this seems useful for a cross database search application I had in mind. Would you be able to describe more, particularly its limitations and how you are using it? Also, why did you role your own code for ngram similarity instead of using the builtin difflib.SequenceMatcher? Richard On Dec 12,

[web2py:37104] Re: multiple SQLForms and rows datetime problem

2009-12-12 Thread Mikey J
This problem comes also with default view.. and Firefox, IE7.. Too depressed to try opera ;) On 13 joulu, 00:45, Mikey J wrote: > Hello, > > I've four rows from db, four SQLForms in view. > {{=form1}} > {{=form2}} > {{=form3}} > {{=form4}} > forms come from same table and every form has two date

[web2py:37103] Re: Custom Form Element For Crud.Create

2009-12-12 Thread Mengu
massimo, can you please explain what you mean by processing "xxx"? On Dec 11, 7:53 pm, Mengu wrote: > thank you annet and massimo. your posts were helpful. > > massimo, what you mean by processing "xxx" on onaccept? like form = > crud.create(table, onaccept=aMethodName) and then def aMethodName

[web2py:37102] Re: Using alternate login method with custom auth_user table

2009-12-12 Thread Diz
Thanks...that was it. I'm new to web2py and just don't have all the details down. As I read the the manual I see now why this wouldn't work but I won't of thought of it in a million years. To Massimo and all the developers: Thanks this is a great SIMPLE framework. I'm more productive with web2p

[web2py:37101] multiple SQLForms and rows datetime problem

2009-12-12 Thread Mikey J
Hello, I've four rows from db, four SQLForms in view. {{=form1}} {{=form2}} {{=form3}} {{=form4}} forms come from same table and every form has two datetime fields. calendar only works in first form in view. Does not mather witch form comes first datetime picker works only in that form Am I doin

[web2py:37100] Re: Using alternate login method with custom auth_user table

2009-12-12 Thread mr.freeze
Try removing the IS_STRONG validator temporarily and see if it works. On Dec 12, 2:02 pm, Diz wrote: > Hi All, > > I'm trying to use a custom user table AND an alternate login method. > I get everything to work (i.e. no errors) BUT when I try to log in I > get a flash message saying: > > "Minimum

[web2py:37099] Using alternate login method with custom auth_user table

2009-12-12 Thread Diz
Hi All, I'm trying to use a custom user table AND an alternate login method. I get everything to work (i.e. no errors) BUT when I try to log in I get a flash message saying: "Minimum length is 8 Must include at least 1 of the following : ~...@#$%^&*()_+-=?<>,.:;{}[]| Must include at least 1 upper

[web2py:37098] Re: sqlform view

2009-12-12 Thread __Kyo__
Thanks ^^ On 11 dic, 17:16, mdipierro wrote: > {{=SQLTABLE(rows,truncate=1000)}} > > On Dec 11, 4:10 pm, __Kyo__ wrote: > > > Hi, I use sqltable to show data, but i want to show al the field data, > > but it just shows me a part of it, like this: > > > auth_user.id    auth_user.first_name    aut

[web2py:37097] Re: Fail login doesn't return an errorm msg

2009-12-12 Thread Yannick
Hello Massimo, thanks for the note... i did follow your instructions which was : 1) I put this in the view {{=loginform}} 2) I print request.function and request.vars from the model And here is what i see: login login It looks like there is a double redirect... I did create a small brand new ap

[web2py:37096] Re: Omit default controller for for any action

2009-12-12 Thread kbochert
I added a slice at web2pyslices.com showing how I 'solved' this problem. see 'cleaner urls with routes.py' Karl On Nov 29, 6:58 am, mdipierro wrote: > If I understand you want that > > /f is mapped into /app/default/f > > for every f in default.py if there is no app called f and no > controller

[web2py:37095] Re: crud.update(...,message,...)

2009-12-12 Thread annet
Massimo, > I am not sure I understand the problem. Let me assume you want the > message displayed after redirection. In this case you need to use > > crud.update(...,message='') > > and message will be displayed after redirection. The message didn't display after redirection because it was ov

[web2py:37094] Re: Saving Session Variables via a Form

2009-12-12 Thread mdipierro
Instead of this: form=FORM(SELECT(organizations, _name='organization_id',requires=IS_IN_SET(organizations)),INPUT (_type='submit')) I would do ids=[o.id for o in organizations] names=[o.name for o in organizations] form=SQLFORM.factory(Field('organizaiton_id',requires=IS_IN_SET (ids,names)))

[web2py:37093] Re: web2py DAL Boolean type does not play well with others

2009-12-12 Thread mdipierro
This problem does not exist not and should not exist later (unless there is a bug I am not aware of). Independently on how boolean is stored in DB, it is bool in web2py (True/False, not 0/1 or 'T'/'F'). Therefore they are always exported and imported as bool. massimo On Dec 12, 10:53 am, Thadeus

[web2py:37092] Re: Saving Session Variables via a Form

2009-12-12 Thread johntynan
Thank you for your suggestions. At this point, I am not trying to create a record in the database at the same time that I am setting a session variable. What I would like to do is set session.organization_id (and possibly session.organization_name) by way of a selection list. I am able to get th

Re: [web2py:37091] Re: web2py DAL Boolean type does not play well with others

2009-12-12 Thread Thadeus Burgess
You have another problem of boolean fields that get exported to csv on say sqlite, and need to be imported to the production server... there will need to be a type conversion from T to 1. -Thadeus On Sat, Dec 12, 2009 at 9:36 AM, mdipierro wrote: > This is a good point. It is as it is becaus

[web2py:37090] Re: can't upload w2p from/to changeset 10

2009-12-12 Thread Yarko Tymciurak
On Dec 12, 9:25 am, mdipierro wrote: > Thanks. I will fix this in trunk. As usual this is because of a new > feature introduced in 10. "review by releasing" - heh ;-) > > On Dec 11, 9:40 pm, DenesL wrote: > > > > > w2p files created with changeset 10 give this error on upload (also > > r

[web2py:37089] Re: attention ! attention !

2009-12-12 Thread mdipierro
fixed in trunk. Will re-post On Dec 12, 9:25 am, Brian M wrote: > Massimo, > > Testing of the Windows binary version fails: > > Creating an app with "Create new application" works fine. HOWEVER, > trying to "Upload existing application" fails with the following error > ticket: > > Traceback (most

[web2py:37088] Re: web2py DAL Boolean type does not play well with others

2009-12-12 Thread mdipierro
This is a good point. It is as it is because originally my concern was to have the same type mapped into the same type as much as possible. Another problem is that some systems do not allow storage of NULL in boolean and that requires treating the type as an exception. This cannot be changed for b

[web2py:37087] Re: crud.update(...,message,...)

2009-12-12 Thread mdipierro
I am not sure I understand the problem. Let me assume you want the message displayed after redirection. In this case you need to use crud.update(...,message='') and message will be displayed after redirection. On Dec 12, 9:07 am, annet wrote: > Massimo, > > Is there a way to solve this prob

[web2py:37086] Re: attention ! attention !

2009-12-12 Thread Brian M
Massimo, Testing of the Windows binary version fails: Creating an app with "Create new application" works fine. HOWEVER, trying to "Upload existing application" fails with the following error ticket: Traceback (most recent call last): File "gluon/main.py", line 436, in wsgibase File "gluon/m

[web2py:37085] Re: can't upload w2p from/to changeset 10

2009-12-12 Thread mdipierro
Thanks. I will fix this in trunk. As usual this is because of a new feature introduced in 10. On Dec 11, 9:40 pm, DenesL wrote: > w2p files created with changeset 10 give this error on upload (also > running changeset 10): > > Traceback (most recent call last): >   File "C:\web2py\hg\gluon\main.p

[web2py:37084] Re: attention ! attention !

2009-12-12 Thread mdipierro
oops. On Dec 12, 7:30 am, Markus Gritsch wrote: > Hi, > > the source package contains all kind of $py.class files.  A release > should be done by packaging a fresh check-out from a version control > system -- not by zipping some working directory. > > Kind regards, > Markus -- You received this

[web2py:37083] Re: crud.update(...,message,...)

2009-12-12 Thread annet
Massimo, Is there a way to solve this problem? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr.

[web2py:37082] web2py DAL Boolean type does not play well with others

2009-12-12 Thread Markus Gritsch
Hi, web2py's Boolean implementation (as CHAR(1) with 'T' and 'F' values) periodically leads to some confusion [1][2]. Further it leads to problems when trying to connect to an existing schema created by some other ORM. Both SQLObject and SQLAlchemy use BOOLEAN as the SQL data type with values 0

[web2py:37081] Re: can't upload w2p from/to changeset 10

2009-12-12 Thread DenesL
After removing the repository and downloading from changeset 16 the problem continues. "Create new app" works but "upload app" welcome.w2p and rename it "w2" gives the same error. On Dec 11, 11:46 pm, Brian M wrote: > Strange, I just tried with hg changeset 11 and it worked. > > My Steps: > 1) "

[web2py:37080] Re: new on web2pyslices.com: WebGrid

2009-12-12 Thread villas
On Dec 11, 10:13 pm, "mr.freeze" wrote: > Just added: multiple grids per page is supported now! Very useful. Thanks for your further explanations too. -David -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to

[web2py:37079] Re: attention ! attention !

2009-12-12 Thread Markus Gritsch
Hi, the source package contains all kind of $py.class files. A release should be done by packaging a fresh check-out from a version control system -- not by zipping some working directory. Kind regards, Markus -- You received this message because you are subscribed to the Google Groups "web2p

[web2py:37078] Re: validator breaks update and create other table

2009-12-12 Thread annet
Massimo, > (db.companyactivity.activity==request.vars.activity) > > the left hand side a reference field or an int and the right hand side > is a string. Hard to follow ... I apologize for that. The combination table reads like: db.define_table('companyactivity', Field ('company',db.company,