[web2py] WARNING:web2py.cron:WEB2PY CRON Call returned code 2:

2010-12-06 Thread encompass
I have web2py in a directory with spaces in it. It seems it parses the directory location and stops at the space. I can't tell exactly what it says but it is similar to this: can't open file '/home/encompass/Programming/John' : [Errno 2] No such file or directory The directory in programming is "J

[web2py] Re: couchdb anybody?

2010-12-06 Thread mdipierro
Denes had a prototype for the old DAL. I will talk to him and one of us should try merge it with the new dal. On Dec 7, 12:52 am, Bruno Rocha wrote: > Very Nice! > > I will help testing this in my production couchdb mirror tomorrow, > > any news for mongodb? > > 2010/12/7 mdipierro > > > > > for

[web2py] Re: new dal

2010-12-06 Thread mdipierro
I am but it is hard to fit in the DAL paradigm. I can think of NoSQL of something a relational database without JOINS and transactions but ZODB is something more complex. If you have any idea of it could work, let us know. Massimo On Dec 7, 12:46 am, "G. Clifford Williams" wrote: > You got it. >

Re: [web2py] Re: couchdb anybody?

2010-12-06 Thread Bruno Rocha
Very Nice! I will help testing this in my production couchdb mirror tomorrow, any news for mongodb? 2010/12/7 mdipierro > forget it. it works. The mistake is in what I am printing. This now > runs fine! > > from sql import DAL, Field > db=DAL('couchdb://127.0.0.1:5984') > db.define_table('pers

Re: [web2py] Re: new dal

2010-12-06 Thread G. Clifford Williams
You got it. BTW, anyone else interested in ZODB support? It's not the new fangled toy that these NoSQL databases are but it's still awesome. --G. Clifford Williams Sent from some mobile device On Dec 7, 2010, at 12:23 AM, mdipierro wrote: > I got CouchDB working. Denes is working on MongoDB.

[web2py] Re: couchdb anybody?

2010-12-06 Thread mr.freeze
Nice! On Dec 7, 12:08 am, mdipierro wrote: > forget it. it works. The mistake is in what I am printing. This now > runs fine! > > from sql import DAL, Field > db=DAL('couchdb://127.0.0.1:5984') > db.define_table('person',Field('name')) > id=db.person.insert(name='Jim') > print id > row=db.person(

[web2py] Re: new dal

2010-12-06 Thread mdipierro
I got CouchDB working. Denes is working on MongoDB. I think we are setup for December. In January, you could provide a Cassandra server. ;-) massimo On Dec 7, 12:19 am, "G. Clifford Williams" wrote: > I can donate a couple of FreeBSD jails with various databases setup if you > let me know what

Re: [web2py] Re: new dal

2010-12-06 Thread G. Clifford Williams
I can donate a couple of FreeBSD jails with various databases setup if you let me know what you want. --G. Clifford Williams Sent from some mobile device On Dec 6, 2010, at 4:38 PM, mdipierro wrote: > With the new DAL it should take very little to create a DAL interface > to mongodb, couchdb,

[web2py] Re: couchdb anybody?

2010-12-06 Thread mdipierro
forget it. it works. The mistake is in what I am printing. This now runs fine! from sql import DAL, Field db=DAL('couchdb://127.0.0.1:5984') db.define_table('person',Field('name')) id=db.person.insert(name='Jim') print id row=db.person(id) print row print db(db.person.id==id).update(name="john") p

[web2py] Re: ajax return nothing

2010-12-06 Thread mdipierro
return '' On Dec 6, 10:01 pm, weheh wrote: > Is it possible to write a web2py ajax call where the server returns > nothing? If so, how to do it? So far, I figure I *must* return at > least a jQuery command targeted at a dummy id. But I would very much > prefer to return nothing at all for simplic

[web2py] couchdb anybody?

2010-12-06 Thread mdipierro
I just added a partial and experiment support for couch in the new DAL. I have a problem and perhaps some of you may help me. 1) am running couchdbx on mac (download and click, starts couchdb, no questions asked) 2) I am running the following python script from sql import DAL, Field db=DAL('cou

[web2py] Re: new dal

2010-12-06 Thread ron_m
I still have MySQL installed so copied the app, changed database URL, deleted all files under the applications databases directory, created empty db, let app create empty tables by running it once to login screen. I then did the all data from tables at once export from PostgreSQL (db.export_to_csv

[web2py] ajax return nothing

2010-12-06 Thread weheh
Is it possible to write a web2py ajax call where the server returns nothing? If so, how to do it? So far, I figure I *must* return at least a jQuery command targeted at a dummy id. But I would very much prefer to return nothing at all for simplicity sake, since I don't want to update the browser wi

[web2py] Re: new dal

2010-12-06 Thread VP
On Dec 6, 6:35 pm, mdipierro wrote: > Here is some more info about the new DAL > http://web2py.com/examples/static/new_dal_help.pdf > Should class Query have been called class Filter? just curious.

[web2py] Re: new dal

2010-12-06 Thread ron_m
Massimo, you nailed it for the sequence name problems. I tested almost all of my app and got one more ticket. Traceback (most recent call last): File "/home/camcentral/Dev/web2py_hg/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/camcentral/Dev/web2py_hg

[web2py] Re: new dal

2010-12-06 Thread mdipierro
I think I fixed the problem with sequence name. Please check. On Dec 6, 8:45 pm, ron_m wrote: > That above patch prevents the old sql.py DAL from working with > sqlhtml.py  because old dal does have a field attribute > field._tablename which sqlhtml.py was looking for before the patch. > > I get

[web2py] Re: new dal

2010-12-06 Thread ron_m
I pulled in the latest trunk version of sqlhtml.py and there was an additional change at line 973 over and above the 2 lines I mentioned before at 62 and 216 self.table._tablename became self.table.tablename which now causes a new ticket rendering the login form. I guess that line needs to be put

[web2py] Re: new dal

2010-12-06 Thread ron_m
That above patch prevents the old sql.py DAL from working with sqlhtml.py because old dal does have a field attribute field._tablename which sqlhtml.py was looking for before the patch. I get the login form posted, fill it in but submit on the form to complete the login gets a ticket. I tried to

Re: [web2py] Re: when to use ajax

2010-12-06 Thread Branko Vukelic
On Tue, Dec 7, 2010 at 3:26 AM, Phyo Arkar wrote: > Thanks man! > > i am now going to build a mockup of my app using it! No problem. Good luck! -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.fl

Re: [web2py] Re: when to use ajax

2010-12-06 Thread Phyo Arkar
Thanks man! i am now going to build a mockup of my app using it! On Mon, Dec 6, 2010 at 11:31 PM, Branko Vukelic wrote: > Sry, the API docs link was from my home server. :P Here's the correct url: > > http://demo.qooxdoo.org/1.2.x/apiviewer/#qx.ui.embed.Html > > On Mon, Dec 6, 2010 at 5:59 PM,

[web2py] Re: new dal

2010-12-06 Thread mdipierro
fixed in trunk. Thanks. On Dec 6, 7:31 pm, ron_m wrote: > Another patch > > Hit login form getting a ticket. > > sqlhtml.py > > line 62 and line 216 > > field._tablename should be field.tablename > > Ron

Re: [web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
a minor fix: if headers=='labels': headers = {} for c in columns: tablename = ' '.join([w for w in c.split('.')[0].split('_')]) fieldname = ''.join([w for w in c.split('.')[-1]]) headers[c] = sqlrows.db[tablename][fieldname].

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-06 Thread tomt
Thanks for the example and the reference. - Tom On Dec 6, 5:58 pm, villas wrote: > Hi tomt > > I believe it takes the fields from the specified source table and > lines them up with a target table.  Any fields which don't match and > the id are discarded. > > What Denes means is that it wouldn'

Re: [web2py] Re: Interesting fights

2010-12-06 Thread Branko Vukelic
On Tue, Dec 7, 2010 at 2:27 AM, Anthony wrote: >> > On Dec 6, 7:51 pm, Branko Vukelic wrote: >> >> Oooh, someone's going legal: >> >> >> "For example suing pyjamas." -- Massimo >> >> > For the record, Redditors, just a typo ("suing" --> "using") -- no one >> > is suing pyjamas. ;) >> >> Really? :

[web2py] Re: new dal

2010-12-06 Thread ron_m
Another patch Hit login form getting a ticket. sqlhtml.py line 62 and line 216 field._tablename should be field.tablename Ron

[web2py] Re: Interesting fights

2010-12-06 Thread Anthony
> > On Dec 6, 7:51 pm, Branko Vukelic wrote: > >> Oooh, someone's going legal: > > >> "For example suing pyjamas." -- Massimo > > > For the record, Redditors, just a typo ("suing" --> "using") -- no one > > is suing pyjamas. ;) > > Really? :D Well, I did wink. Actually, there are a few questionab

[web2py] Re: new dal

2010-12-06 Thread mdipierro
I like that it is pure python. It would go in contrib not in site- packages. Anybody opposes? Can you help us keep it in sync with the official repo? On Dec 6, 6:45 pm, Vasile Ermicioi wrote: > I propose to include a copy in site-packages and distribute it with web2py, > so no installation wi

Re: [web2py] Re: Interesting fights

2010-12-06 Thread Branko Vukelic
On Tue, Dec 7, 2010 at 2:06 AM, Anthony wrote: > On Dec 6, 7:51 pm, Branko Vukelic wrote: >> Oooh, someone's going legal: >> >> "For example suing pyjamas." -- Massimo > > For the record, Redditors, just a typo ("suing" --> "using") -- no one > is suing pyjamas. ;) Really? :D -- Branko Vukelić

[web2py] Re: Interesting fights

2010-12-06 Thread Anthony
On Dec 6, 8:01 pm, mdipierro wrote: > oops. where is the typo? Point #4 in your original comment: http://www.reddit.com/r/Python/comments/edvws/an_often_asked_question_to_which_i_still_dont/c17dny3

[web2py] Re: Interesting fights

2010-12-06 Thread Anthony
On Dec 6, 7:51 pm, Branko Vukelic wrote: > Oooh, someone's going legal: > > "For example suing pyjamas." -- Massimo For the record, Redditors, just a typo ("suing" --> "using") -- no one is suing pyjamas. ;)

[web2py] Re: Interesting fights

2010-12-06 Thread mdipierro
oops. where is the typo? On Dec 6, 6:51 pm, Branko Vukelic wrote: > Oooh, someone's going legal: > > "For example suing pyjamas." -- Massimo > > But watch out, the opponent is rich (Internet application). ;) > > > > On Tue, Dec 7, 2010 at 1:04 AM, Anthony wrote: > > Awkward timing. Don't let Red

Re: [web2py] Re: Interesting fights

2010-12-06 Thread Branko Vukelic
Oooh, someone's going legal: "For example suing pyjamas." -- Massimo But watch out, the opponent is rich (Internet application). ;) On Tue, Dec 7, 2010 at 1:04 AM, Anthony wrote: > Awkward timing. Don't let Reddit[1] find out about these "fights". :) > > [1] > http://www.reddit.com/r/Python/co

Re: [web2py] Re: new dal

2010-12-06 Thread Vasile Ermicioi
I propose to include a copy in site-packages and distribute it with web2py, so no installation will be required, it is quite small < 100kb

[web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread mdipierro
send me a patch. On Dec 6, 6:29 pm, Bruno Rocha wrote: > One more time: > > in sqlhtml.py we have: > > if headers=='fieldname:capitalize':            headers = {} > for c in columns:                headers[c] = ' '.join([w.capitalize() > for w in c.split('.')[-1].split('_')]) > > so what about in

[web2py] Re: new dal

2010-12-06 Thread mdipierro
No objection. We will default to the new one if it is installed of the latter otherwise On Dec 6, 6:36 pm, Vasile Ermicioi wrote: > I am testing new dal (alone, without web2py) and also tested one old idea - > I use pymysql instead of MySQLdb, and it works fine with python (2.7) and > jython (2.

[web2py] Re: new dal

2010-12-06 Thread mdipierro
That is the point. I think it is fully backward compatible but the source is so different that it is possible something breaks. Nothing that cannot be fixed but I'd rather fix it sooner than later. On Dec 6, 6:24 pm, villas wrote: > Providing that it's backwards compatible, you don't need to ask.

Re: [web2py] Re: new dal

2010-12-06 Thread Vasile Ermicioi
I am testing new dal (alone, without web2py) and also tested one old idea - I use pymysql instead of MySQLdb, and it works fine with python (2.7) and jython (2.5rc2) why not integrating it on web2py, I think that makes web2py what it claims to be "requires no installation" also it seems to have a

[web2py] Re: new dal

2010-12-06 Thread mdipierro
Here is some more info about the new DAL http://web2py.com/examples/static/new_dal_help.pdf hope it helps read the source code. Massimo On Dec 6, 6:08 pm, mdipierro wrote: > For now, for testing purposes I am going to copy dal.py over sql.py > and post a nightly build using the new dal. > > Lo

Re: [web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
This is how I changed SQLTABLE class http://snipt.net/rochacbruno/sqltable 2010/12/6 Bruno Rocha > One more time: > > in sqlhtml.py we have: > > if headers=='fieldname:capitalize':headers = {}for c > in columns:headers[c] = ' '.join([w.capitalize() for

Re: [web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
One more time: in sqlhtml.py we have: if headers=='fieldname:capitalize':headers = {} for c in columns:headers[c] = ' '.join([w.capitalize() for w in c.split('.')[-1].split('_')]) so what about including the peace of code I mentioned? if headers=='labels':

[web2py] Re: new dal

2010-12-06 Thread villas
Providing that it's backwards compatible, you don't need to ask. IMO test, upgrade, then never look back! -D On Dec 7, 12:08 am, mdipierro wrote: > For now, for testing purposes I am going to copy dal.py over sql.py > and post a nightly build using the new dal. > > Long term, is this ia good solu

[web2py] Re: new dal

2010-12-06 Thread mdipierro
both trunk and the nightly built in the web2py download page use the new dal as opposed to the old one. Please give it a try. Specifically if you are using something other than sqlite. please report any test you make. It is critical to know if this works fine because I am planning to remove complet

[web2py] Re: new dal

2010-12-06 Thread mdipierro
For now, for testing purposes I am going to copy dal.py over sql.py and post a nightly build using the new dal. Long term, is this ia good solution. I would like to keep both sql.py and dal.py and import DAL, Field from the latter but this would break existing "from gluon.sql import *". In order n

[web2py] Re: Interesting fights

2010-12-06 Thread Anthony
Awkward timing. Don't let Reddit[1] find out about these "fights". :) [1] http://www.reddit.com/r/Python/comments/edvws/an_often_asked_question_to_which_i_still_dont/c17mxpx On Dec 6, 11:57 am, Branko Vukelic wrote: > http://www.googlefight.com/index.php?lang=en_GB&word1=python+programm...htt

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-06 Thread villas
Hi tomt I believe it takes the fields from the specified source table and lines them up with a target table. Any fields which don't match and the id are discarded. What Denes means is that it wouldn't work when for example you use form.vars from multiple tables which have some identical field na

[web2py] Re: orderby='' on Google App Engine

2010-12-06 Thread mdipierro
and you can put your own modules in web2py/site-packages and they will be deployed with your app. On Dec 6, 5:16 pm, Albert Abril wrote: > I didn't know i could use imports in GAE > Thank you Massimo. > > On Mon, Dec 6, 2010 at 11:53 PM, mdipierro wrote: > > import random > > ... > > rows=db(...

Re: [web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
I do not want a form, a need to use the plugin_datatable. Finally what I did: # In models def get_header_labels(table=None): headers = {} for field in db[table].fields: headers[table+'.'+field] = db[table][field].label return headers # in My view/controller list = SQLTABLE(

[web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread mdipierro
if you make a form there is a dict in form.custom.label[fielname] or form.custom.label.fielname On Dec 6, 5:19 pm, Bruno Rocha wrote: > OK, I found that labels are in db.fieldname.label, now I just have to create > a dict. > > 2010/12/6 Bruno Rocha > > > > > > > > > HI, > > > I have a 'category'

[web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
The problem is solved in this way: >>> headers = {} >>> for field in db['category'].fields: ... headers['category.'+field] =db['category'][field].label ... >>> headers {'category.created_on': 'Created On', 'updated_by': 'Updated By', 'category.updated_on': 'Updated On', 'category.created_by':

[web2py] Re: Interesting fights

2010-12-06 Thread mdipierro
LOL On Dec 6, 5:15 pm, villas wrote: > 'fat and ugly' is 3 times more popular than 'slim and sexy' > > Does that give the 'django' vs 'web2py' fight a different perspective? > > -D

[web2py] Re: How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
OK, I found that labels are in db.fieldname.label, now I just have to create a dict. 2010/12/6 Bruno Rocha > HI, > > I have a 'category' table: > > db.define_table('category', > Field('name',label=T('Name')), > signature, > format='%(name)s' >

Re: [web2py] Re: orderby='' on Google App Engine

2010-12-06 Thread Albert Abril
I didn't know i could use imports in GAE Thank you Massimo. On Mon, Dec 6, 2010 at 11:53 PM, mdipierro wrote: > import random > ... > rows=db(...).select().sort(lambda row: random.random()) > > On Dec 6, 4:09 pm, Albert Abril wrote: > > Hi! > > > > As said on the book, in a DAL select, orderby

[web2py] Re: Interesting fights

2010-12-06 Thread villas
'fat and ugly' is 3 times more popular than 'slim and sexy' Does that give the 'django' vs 'web2py' fight a different perspective? -D

[web2py] Re: orderby='' on Google App Engine

2010-12-06 Thread mdipierro
import random ... rows=db(...).select().sort(lambda row: random.random()) On Dec 6, 4:09 pm, Albert Abril wrote: > Hi! > > As said on the book, in a DAL select, orderby='' is not supported on > GAE.http://web2py.com/book/default/chapter/06#orderby,-groupby,-limitby,-... > > Someone knows the best

[web2py] How to pass table labels to SQLTABLE headers param?

2010-12-06 Thread Bruno Rocha
HI, I have a 'category' table: db.define_table('category', Field('name',label=T('Name')), signature, format='%(name)s' ) which I defined a label for the field 'name' I need to create something like: list = plugin_datatable(db(db.c

[web2py] Re: new dal

2010-12-06 Thread mdipierro
With the new DAL it should take very little to create a DAL interface to mongodb, couchdb, etc. I can work on this if - you help me prioritize - you can give me access to a machine that already has your favorite nosql db installed ready for testing Massimo On Dec 6, 3:10 pm, Jonathan Lundell w

[web2py] Re: new dal

2010-12-06 Thread ron_m
Put dal.py over sql.py in trunk Start server python web2py.py Get welcome app in browser Hit login link get ticket. I also get this in my own application trying to login. Field does not have attribute _tablename Ron Traceback (most recent call last): File "/home/camcentral/Dev/web2py_hg/gluon

[web2py] Re: new dal

2010-12-06 Thread mdipierro
Fixed in trunk. Thanks for testing On Dec 6, 4:19 pm, ron_m wrote: > Ok I found the cannot connect to PostgreSQL database problem. I have a > password on the user id to access the db in my application so in > > class PostgreSQLAdapter(BaseAdapter): function __init__(...) > > The re.compile line e

[web2py] Re: new dal

2010-12-06 Thread ron_m
Ok I found the cannot connect to PostgreSQL database problem. I have a password on the user id to access the db in my application so in class PostgreSQLAdapter(BaseAdapter): function __init__(...) The re.compile line element for the database password is 'passwd' which does not match the

[web2py] orderby='' on Google App Engine

2010-12-06 Thread Albert Abril
Hi! As said on the book, in a DAL select, orderby='' is not supported on GAE. http://web2py.com/book/default/chapter/06#orderby,-groupby,-limitby,-distinct Someone knows the best way to randomize a Rows dictionary? (thinking in GAE deployment of course) Thanks in advance.

Fwd: [web2py] Re: new dal

2010-12-06 Thread Jonathan Lundell
(sent from wrong address) Begin forwarded message: > From: Jonathan Lundell > Date: December 6, 2010 2:03:54 PM PST > To: "web2py@googlegroups.com" > Subject: Re: [web2py] Re: new dal > > On Dec 6, 2010, at 1:15 PM, mdipierro wrote: > >> I am not sure. There are pros and cons in both cases

Re: [web2py] typo in the book

2010-12-06 Thread Richard Vézina
No! Forget it... My error! On Mon, Dec 6, 2010 at 4:40 PM, Richard Vézina wrote: > Hello, > > There is a little typo in the book : > > http://www.web2py.com/book/default/chapter/04#T-and-Internationalization > > Example 5 : > > > T("blah %(name)s blah") % dict(name='Tim') > > I think it should :

[web2py] typo in the book

2010-12-06 Thread Richard Vézina
Hello, There is a little typo in the book : http://www.web2py.com/book/default/chapter/04#T-and-Internationalization Example 5 : T("blah %(name)s blah") % dict(name='Tim') I think it should : T("blah %(name)s blah") % dict(name='Tim')) Richard

[web2py] Re: new dal

2010-12-06 Thread mdipierro
I am not sure. There are pros and cons in both cases. What do you think. For me it is easier to manage to this way. I tried to break it but it would require even more re-factoring and I was not sure it was worth it. Massimo On Dec 6, 3:10 pm, Jonathan Lundell wrote: > On Dec 6, 2010, at 12:5

[web2py] Registration form

2010-12-06 Thread appydev
Greetings. I disable the registration form that generated auth: auth.settings.actions_disabled = ['register'] I made a new registration form that stores information in two tables (auth_user and teacher), with the help of this recipe: http://www.web2pyslices.com/main/slices/take_slice/102 B

Re: [web2py] Re: new dal

2010-12-06 Thread Jonathan Lundell
On Dec 6, 2010, at 12:55 PM, mdipierro wrote: > > 1) The new DAL (dal.py) passes all the tests I have. > 2) The new DAL has integrated GAE support (datastore) without need for > contrib/gql.py > 3) The new DAL is better because more customizable, smaller (10%), and > more readable > 4) The new DAL

[web2py] Re: Limit Upload size and File type

2010-12-06 Thread mdipierro
Yes. IS_LENGTH(...) works for file size upload IS_UPLOAD_FILENAME and IS_IMAGE can be used to filter by extension and content respectively. On Dec 6, 12:37 pm, Andrew Evans wrote: > Hello I am wondering if there is a way to limit the File type and upload > size in web2py > > I have my db field n

[web2py] Re: list:integer X list:reference for auth_user table

2010-12-06 Thread mdipierro
yes. the difference is only in the default validator. On Dec 6, 2:27 pm, Bruno Rocha wrote: > So I understand that there are no difference between the two forms, right? > > as list:reference and list:integer will store the same in db. > > -- > > Bruno Rochahttp://about.me/rochacbruno/bio

[web2py] GAE issue with !=

2010-12-06 Thread mdipierro
has anybody been able to use != on GAE? It does not seem to work for me (always returns False). Massimo

[web2py] Re: new dal

2010-12-06 Thread mdipierro
Important news! 1) The new DAL (dal.py) passes all the tests I have. 2) The new DAL has integrated GAE support (datastore) without need for contrib/gql.py 3) The new DAL is better because more customizable, smaller (10%), and more readable 4) The new DAL is one single file and it does not depend o

Re: [web2py] list:integer X list:reference for auth_user table

2010-12-06 Thread Bruno Rocha
So I understand that there are no difference between the two forms, right? as list:reference and list:integer will store the same in db. -- Bruno Rocha http://about.me/rochacbruno/bio

Re: [web2py] list:integer X list:reference for auth_user table

2010-12-06 Thread Kuba Kucharski
> Field('assigned_to','list:reference auth_user'), > > In the case of 2, how to represent as 'db.auth_user.first_name' for multiple > users requires=IS_IN_DB(db,'auth_user.id','%(first_name)s',multiple=True)

[web2py] Re: new dal

2010-12-06 Thread ron_m
Ok that worked for starting the welcome app. As Jonathan suggests the self.uri in ConnectionPool.pools[self.uri] needs to be instance.uri as well. I will look to see why the application I am working on won't connect to postgresql - timeout after 5 tries and get back if I find the cause. Thanks Ro

[web2py] Re: Limit Upload size and File type

2010-12-06 Thread Andrew Evans
Nvm I found what I needed :-) On Mon, Dec 6, 2010 at 10:37 AM, Andrew Evans wrote: > Hello I am wondering if there is a way to limit the File type and upload > size in web2py > > I have my db field named images and I want to specify just gif, jpg, png > for example :D > > As well as a File Size

[web2py] Limit Upload size and File type

2010-12-06 Thread Andrew Evans
Hello I am wondering if there is a way to limit the File type and upload size in web2py I have my db field named images and I want to specify just gif, jpg, png for example :D As well as a File Size any ideas *cheers PS Sorry if this question has been asked before but I couldn't find any info o

[web2py] Re: translation dict name? + my solution

2010-12-06 Thread Richard Vézina
language translation dict*.update(translate_ui_tables_names) I am reading gluon/languages.py I can't just do : in the language file (ex.: fr-fr.py) {key:vaule}.update(translate_ui_tables_names) Because the file is updated automatically... Where could I add my update to the regular process of

Re: [web2py] Re: Apply CSS class to form Generated from DAL?

2010-12-06 Thread Andrew Evans
hey ty very much for that worked great :D On Sun, Dec 5, 2010 at 7:15 PM, mdipierro wrote: > db.define_table('thing',Field('color')) > form = SQLFORM(db.thing) > form.element('input[name=color]')['_class']='myclass' > ^ you can use jQuery notation to select elements > (serverside)

[web2py] LIKE case sensitivity: Postgres differs to MySQL => DAL not portable

2010-12-06 Thread Fran
I see that Postgres defaults to a case-sensitive LIKE whereas MySQL & sqlite default to case-insensitive: http://www.postgresql.org/docs/8.0/interactive/functions-matching.html - ILIKE for case-insensitive http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html http://www.sqlite.org/lang_expr.

Re: [web2py] Re: Interesting fights

2010-12-06 Thread Tiago Castro Henriques
I'm fascinated by the Google Trends for web2py: http://www.google.com/trends?q=web2py Russian is the most popular language for web2py mentions, followed closely by Chinese. Beijing seems to be the world capital of web2py mentions, with Shanghai in 4th place. In terms of regions, Taiwan is 1st,

Re: [web2py] Re: Interesting fights

2010-12-06 Thread Branko Vukelic
Nothing scientific. It's just you know... a 'haha' thing. ;) On Mon, Dec 6, 2010 at 6:58 PM, mdipierro wrote: > based on what? > > On Dec 6, 10:57 am, Branko Vukelic wrote: >> http://www.googlefight.com/index.php?lang=en_GB&word1=python+programm...http://www.googlefight.com/index.php?lang=en_GB&

Re: [web2py] Re: Interesting fights

2010-12-06 Thread Jonathan Lundell
On Dec 6, 2010, at 9:58 AM, mdipierro wrote: > > based on what? Just Ghits, I suppose. Which means that "python programming sucks bigtime" counts toward Python, etc. > > On Dec 6, 10:57 am, Branko Vukelic wrote: >> http://www.googlefight.com/index.php?lang=en_GB&word1=python+programm...http:/

[web2py] Re: Interesting fights

2010-12-06 Thread mdipierro
based on what? On Dec 6, 10:57 am, Branko Vukelic wrote: > http://www.googlefight.com/index.php?lang=en_GB&word1=python+programm...http://www.googlefight.com/index.php?lang=en_GB&word1=python+programm...http://www.googlefight.com/index.php?lang=en_GB&word1=web2py+web+fram...http://www.googlefight

[web2py] Re: Basic models question

2010-12-06 Thread Anthony
Also, the model files are executed in alphabetical order, so model_1.py will have access to things defined in model_0.py, but not the other way around. Anthony On Dec 6, 12:37 pm, Richard Vézina wrote: > The model defined in > > model1.py or in db.py > > will be available in any controllers... >

[web2py] Re: routes conundrum

2010-12-06 Thread mr.freeze
Can you explain how it acts differently? On Dec 6, 11:41 am, Lorin Rivers wrote: > Richard, > > Hence my confusion about it working differently depending on which url you > access it with. > > On Dec 6, 2010, at 11:40 , Richard Vézina wrote: > > > > > By defaulthttp://YOURDOMAIN/AppNameshould re

Re: [web2py] routes conundrum

2010-12-06 Thread Jonathan Lundell
On Dec 6, 2010, at 9:35 AM, Lorin Rivers wrote: > > We've encountered a bug where our app behaves differently if you access it > via /AppName/ than it does if you access it via /AppName/default/index > > What would likely explain that and how should I go about ensuring identical > behavior in e

Re: [web2py] routes conundrum

2010-12-06 Thread Lorin Rivers
Richard, Hence my confusion about it working differently depending on which url you access it with. On Dec 6, 2010, at 11:40 , Richard Vézina wrote: > By default http://YOURDOMAIN/AppName should redirect to > http://YOURDOMAIN/AppName*/default/index* > * > * > *Richard > * > On Mon, Dec 6, 2010

Re: [web2py] routes conundrum

2010-12-06 Thread Richard Vézina
By default http://YOURDOMAIN/AppName should redirect to http://YOURDOMAIN/AppName*/default/index* * * *Richard * On Mon, Dec 6, 2010 at 12:35 PM, Lorin Rivers wrote: > We've encountered a bug where our app behaves differently if you access it > via /AppName/ than it does if you access it via /App

Re: [web2py] Basic models question

2010-12-06 Thread Richard Vézina
The model defined in model1.py or in db.py will be available in any controllers... I not sure but I think the only reason to devide your model in differents model file is for keep the file clean and understandable... For the controllers it is differents if you define a function in a particular

[web2py] routes conundrum

2010-12-06 Thread Lorin Rivers
We've encountered a bug where our app behaves differently if you access it via /AppName/ than it does if you access it via /AppName/default/index What would likely explain that and how should I go about ensuring identical behavior in either case? -- Lorin Rivers Mosasaur: Killer Technical Marke

[web2py] Basic models question

2010-12-06 Thread Lorin Rivers
If a model is defined in db.py, everything in that application has access to it, correct? The only reason to define a model in a different file is if you only need to access that particular model in a similarly named controller, correct? Thanks! -- Lorin Rivers Mosasaur: Killer Technical Marke

[web2py] translation dict name? + my solution

2010-12-06 Thread Richard Vézina
Hello, I come with that solution... I would have comment... I get my translations like this : translate_ui_tables_names=dict((r.table_name_en_ui,r.table_name_fr_ui)\ for r in db().select(db.dict_database.ALL)) Then I just have to : language translation dict*.append(translate_ui_tables_nam

Re: [web2py] Re: new dal

2010-12-06 Thread Jonathan Lundell
On Dec 6, 2010, at 9:13 AM, ron_m wrote: > > I did an update of trunk using hg and copied dal.py over sql.py in > gluon and start the web2py.py server and still get > > Traceback (most recent call last): > File "/home/camcentral/Dev/web2py_hg/gluon/main.py", line 446, in > wsgibase >BaseAdap

[web2py] Re: new dal

2010-12-06 Thread mdipierro
please try replace @staticmethod def close_all_instances(action): """ to close cleanly databases in a multithreaded environment """ if not hasattr(thread,'instances'): return while thread.instances: instance = thread.instances.pop()

[web2py] Re: new dal

2010-12-06 Thread ron_m
I did an update of trunk using hg and copied dal.py over sql.py in gluon and start the web2py.py server and still get Traceback (most recent call last): File "/home/camcentral/Dev/web2py_hg/gluon/main.py", line 446, in wsgibase BaseAdapter.close_all_instances(BaseAdapter.commit) File "/hom

Re: [web2py] Interesting fights

2010-12-06 Thread Richard Vézina
Funny! Richard On Mon, Dec 6, 2010 at 11:57 AM, Branko Vukelic wrote: > > http://www.googlefight.com/index.php?lang=en_GB&word1=python+programming&word2=ruby+programming > > http://www.googlefight.com/index.php?lang=en_GB&word1=python+programming&word2=php+programming > > http://www.googlefight

Re: [web2py] Re: when to use ajax

2010-12-06 Thread Branko Vukelic
Sry, the API docs link was from my home server. :P Here's the correct url: http://demo.qooxdoo.org/1.2.x/apiviewer/#qx.ui.embed.Html On Mon, Dec 6, 2010 at 5:59 PM, Branko Vukelic wrote: > On Mon, Dec 6, 2010 at 6:24 AM, Phyo Arkar wrote: >> I use features as needed in each pages. If i can figu

Re: [web2py] Re: when to use ajax

2010-12-06 Thread Branko Vukelic
On Mon, Dec 6, 2010 at 6:24 AM, Phyo Arkar wrote: > I use features as needed in each pages. If i can figure out  a way to > put jqgrid to work hell , i will use full qxd ! http://qx/api/#qx.ui.embed.Html This allows you to create an HTML element you need in order to attach jqgrid. -- Branko Vu

[web2py] Interesting fights

2010-12-06 Thread Branko Vukelic
http://www.googlefight.com/index.php?lang=en_GB&word1=python+programming&word2=ruby+programming http://www.googlefight.com/index.php?lang=en_GB&word1=python+programming&word2=php+programming http://www.googlefight.com/index.php?lang=en_GB&word1=web2py+web+framework&word2=web.py+web+framewok http://

[web2py] translation dict name?

2010-12-06 Thread Richard Vézina
Hello, I would like to know in wich var name is store the differents language dict?? I would automating the translation of somes entries with key:value that are stored in database table... So I want to get the value that is store in database table for a key of the dict... I just don't know in wi

[web2py] list:integer X list:reference for auth_user table

2010-12-06 Thread Bruno Rocha
Is there any important difference? 1. Field('assigned_to','list:integer',requires=IS_IN_DB(db,db.auth_user.id ,'db.auth_user.first_name',multiple=True)), 2. Field('assigned_to','list:reference auth_user'), In the case of 2, how to represent as 'db.auth_user.first_name' for multiple users? --

  1   2   >