[web2py:12460] Re: DAL - Segregate connections & queries

2008-11-24 Thread mdipierro
If I understand... #create two connections db1=SQLDB(...) db2=SQLDB(...) #define the tables twice (perhaps using the following trick) db1.define_table('mytable',) db2.define_table('mytable',db1.mytable) then use db1 for select and db2 for update, insert, etc. Massimo On Nov 25, 1:52 am,

[web2py:12459] DAL - Segregate connections & queries

2008-11-24 Thread vihang
Hi, I am working on a small project that requires me to direct certain queries to certain database connections. That is, simply put, all select queries to one database connection and update, insert queries to another. Can this be done in web2py without making mods to the DAL code? Cheers Vihang

[web2py:12458] Re: Passing values to the flash helper

2008-11-24 Thread mdipierro
and you do not need db.commit() since on success that is automatic. Massimo On Nov 25, 12:01 am, mdipierro <[EMAIL PROTECTED]> wrote: > id=db.users.update( >email= form.vars.email, >password = form.vars.passw

[web2py:12457] Re: Passing values to the flash helper

2008-11-24 Thread mdipierro
id=db.users.update( email= form.vars.email, password = form.vars.password ) should be id=db.users.insert( email= form.vars.email

[web2py:12456] Re: Passing values to the flash helper

2008-11-24 Thread voltron
I am using: Version 1.51 (2008-11-19 14:48:02) Database drivers available: SQLite3, Postgre The only code that could be of use is this snippet, the rest are several lines of forms, strings, mail templates and such user = db(db.users.id == session.user_id).select() if form.accepts(request.vars

[web2py:12455] Re: Passing values to the flash helper

2008-11-24 Thread mdipierro
Anyway, this works for me. I really cannot imagine what may cause this. I need to see the entire code. Massimo On Nov 24, 10:14 pm, voltron <[EMAIL PROTECTED]> wrote: > I have never had problems with the flash helper, even when I heavily > customized it, but today I noticed something strange, t

[web2py:12454] Re: Passing values to the flash helper

2008-11-24 Thread mdipierro
which version of web2py (please include the date of the version)? Massimo On Nov 24, 10:14 pm, voltron <[EMAIL PROTECTED]> wrote: > I have never had problems with the flash helper, even when I heavily > customized it, but today I noticed something strange, this seemingly > harmless code: > > ses

[web2py:12453] Passing values to the flash helper

2008-11-24 Thread voltron
I have never had problems with the flash helper, even when I heavily customized it, but today I noticed something strange, this seemingly harmless code: session.flash = user[0].user_name # This is a string field in the db or session.flash = str(user[0].user_name) or session.flash = str(user[0].i

[web2py:12452] Re: new T2

2008-11-24 Thread mdipierro
Actually it is secure. If you have email_auth it uses TLS. http://www.ietf.org/rfc/rfc2487.txt Massimo On Nov 24, 8:23 pm, "Wes James" <[EMAIL PROTECTED]> wrote: > Massimo, > > Would you consider a t2.email_auth_ssl so we can have a secure method > for this process? > > thx, > > -wj > > On Mon

[web2py:12451] Re: new T2

2008-11-24 Thread Wes James
Massimo, Would you consider a t2.email_auth_ssl so we can have a secure method for this process? thx, -wj On Mon, Nov 24, 2008 at 2:48 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > I reposted a new version of T2. I fixed a problem with email > verification and added a t2.reset_password > > to u

[web2py:12450] Re: What's wrong with my t2 register coding?

2008-11-24 Thread kw zhu
I see. Thanks, Massimo. Calvin 2008/11/25 mdipierro <[EMAIL PROTECTED]> > > By default the function is off. you say t2.register(verification=True) > if you want it. > In any case you must have the field. > > On Nov 24, 7:34 pm, minglee <[EMAIL PROTECTED]> wrote: > > Thanks, Massimo. > > Does that

[web2py:12449] Re: What's wrong with my t2 register coding?

2008-11-24 Thread mdipierro
By default the function is off. you say t2.register(verification=True) if you want it. In any case you must have the field. On Nov 24, 7:34 pm, minglee <[EMAIL PROTECTED]> wrote: > Thanks, Massimo. > Does that mean, if I want to include e-mail in registration > information, I must use e-mail ver

[web2py:12448] Re: "No databases in this application" on GAE

2008-11-24 Thread sharekey
Hi Jonathan, I try your code, it work well, I can select records from http://127.0.0.1:8080/myapp/appadmin/select/db/mytable now. I find the two modifications in select function is : 1) Replace "query='%s.id>0' % table" with "query = dbname + '.' + table + '.id>0'" 2) Replace "records=

[web2py:12447] Re: What's wrong with my t2 register coding?

2008-11-24 Thread minglee
Thanks, Massimo. Does that mean, if I want to include e-mail in registration information, I must use e-mail verifying function? Calvin On 11月24日, 下午10时18分, mdipierro <[EMAIL PROTECTED]> wrote: > t2 must also have a field SQLField('registration_key',length=64) > > Massimo > > On Nov 24, 2:52 am,

[web2py:12446] Re: new T2

2008-11-24 Thread Wes James
Massimo, I still have to put the t2 static stuff on the apache side as they are not getting picked up on a public face setup for me. -wj On Mon, Nov 24, 2008 at 2:48 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > I reposted a new version of T2. I fixed a problem with email > verification and adde

[web2py:12445] new T2

2008-11-24 Thread mdipierro
I reposted a new version of T2. I fixed a problem with email verification and added a t2.reset_password to use email verification you do t2.email_server="hostname:port" t2.email_auth="username:password" def register(): return dict(form=t2.register(verification=True) def password(): r

[web2py:12444] Re: populating web2py database

2008-11-24 Thread mdipierro
an upload field contains the web2py-given name of the file. the actual file goes in yourapp/uploads/ to do it manually you need: 1) build its new name filename='%s.%s.%s.%s' % (tablename, fieldname,uuid.uuid4 (),extension) 2) move the file under uploads with that name path=path_to_the

[web2py:12443] populating web2py database

2008-11-24 Thread Marco Prosperi
hello everybody, I would like to populate the sqlite database of a web2py application by means of a python script. This script would read data from a file or another relational database and insert records in the web2py database (using pyodbc library and sqlite odbc driver for windows). My question

[web2py:12442] What's wrong with my t2 register coding?

2008-11-24 Thread minglee
In db.py: db.define_table('t2_person', SQLField('name',requires=IS_NOT_EMPTY()), SQLField('password','password',requires=CRYPT ()), SQLField('email',requires=IS_EMAIL())) I put controllers in member.py: def register(): ret

[web2py:12437] Re: Date

2008-11-24 Thread mdipierro
Yes you can do autocomplete with form_factory. You can use jquery to send the value of the field on change. Massimo On Nov 24, 2:08 am, annet <[EMAIL PROTECTED]> wrote: > Massimo, > > Thanks for your reply. I am working on the implementation, this raised > another question. > > In the manual I

[web2py:12441] Re: What's wrong with my t2 register coding?

2008-11-24 Thread mdipierro
t2 must also have a field SQLField('registration_key',length=64) Massimo On Nov 24, 2:52 am, minglee <[EMAIL PROTECTED]> wrote: > In db.py: > db.define_table('t2_person', > SQLField('name',requires=IS_NOT_EMPTY()), > SQLField('password','password'

[web2py:12440] Re: "No databases in this application" on GAE

2008-11-24 Thread mdipierro
In principle I would like to move t2.search into appadmin and thet would solve the problem. How do people fill about it? On Nov 24, 5:28 am, Jonathan Benn <[EMAIL PROTECTED]> wrote: > On Nov 23, 6:27 pm, mdipierro <[EMAIL PROTECTED]> wrote: > > > appadmin needs to be improved. Right now it expec

[web2py:12439] What's wrong with my t2 register coding?

2008-11-24 Thread minglee
In db.py: db.define_table('t2_person', SQLField('name',requires=IS_NOT_EMPTY()), SQLField('password','password',requires=CRYPT ()), SQLField('email',requires=IS_EMAIL())) I put controllers in member.py: def register(): ret

[web2py:12438] Re: Python newbie question about deployment server requirements

2008-11-24 Thread Timothy Farrell
Webfaction is a good choice.  I have one of the websites I run on them and have never any trouble with them.  I needed support help for one thing on setup, but they were responsive and helpful.  Just so you know. -tim SystemicPlural wrote: Thanks I've decided to go with Webfaction for no

[web2py:12436] Re: have multiple button summits which work on different things in a form

2008-11-24 Thread somebody
thank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For mo

[web2py:12435] Re: "No databases in this application" on GAE

2008-11-24 Thread Jonathan Benn
On Nov 23, 6:27 pm, mdipierro <[EMAIL PROTECTED]> wrote: > appadmin needs to be improved. Right now it expects a SQL string and > dumbly passes it to the DB. The string should be parsed and passed to > the DAL instead. Thanks, this is what I suspected. --Jonathan --~--~-~--~~---

[web2py:12434] Re: Appengine / Bulk Loader

2008-11-24 Thread Jonathan Benn
Hi Daniel, On Nov 22, 8:56 pm, "Daniel Contag" <[EMAIL PROTECTED]> wrote: > does anyone have a suggestion how to use the bulk loader for Google > Appengine with a web2py > model?http://code.google.com/appengine/articles/bulkload.html I haven't tried doing this at all yet, since it's still too

[web2py:12433] Re: Updating unique fields -a discussion

2008-11-24 Thread voltron
Thanks Massimo! I knew there was a cleaner way --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group,

[web2py:12432] Re: Updating unique fields -a discussion

2008-11-24 Thread billf
I guess that in "Actually this does not happen with SQLFORM since it is smart enough to figure out that the current record should be included when enforcing IS_NOT_IN_DB(...). ", 'included' should read 'excluded'. On Nov 24, 5:56 am, mdipierro <[EMAIL PROTECTED]> wrote: > Actually this does not h

[web2py:12431] Re: Date

2008-11-24 Thread annet
Massimo, Thanks for your reply. I am working on the implementation, this raised another question. In the manual I read that there are three ways to build forms: FORM, SQLFORM and form_factory. The fields in my form represent the parameters in the WHERE clause of my database query, so I could use