Re: [web2py] Re: bug in SQLFORM.factory?

2010-01-27 Thread Frederik Wagner
> def test1(): >> form=SQLFORM.factory(Field("bool","boolean")) >> >> if form.accepts(request.vars, session, keepvalues=True): >> db.test.insert(bool=request.vars.bool) >> >> return dict(form=form,list=db().select(db.test.ALL)) >

[web2py] bug in SQLFORM.factory?

2010-01-26 Thread Frederik Wagner
Hi .*, it seems to me that there is a bug saving boolean fields with SQLFORM.factory forms. If I define a boolean field in a table and use the standard SQLFORM to make an input form, the accept function will save 'T' of 'F' to the DB. Whereas in the case where I create a form with SQLFORM.factory,

[web2py:35612] mySQL and ON DELETE RESTRICT

2009-11-19 Thread Frederik Wagner
Hi, it might be that I'm missing something, but:t In a table definition I'm using a foreign key reference with the ondelete='RESTRICT'. Following the sql.log and the Table schemes on the DB, this is correctly used in the CREATE TABLE statements . When I'm inserting some data with references and t

[web2py:35093] Re: borken IPV4 validator?

2009-11-11 Thread Frederik Wagner
On Wed, Nov 11, 2009 at 5:15 PM, Jonathan Lundell wrote: > > On Nov 11, 2009, at 2:32 AM, Frederik Wagner wrote: > >> I already filed it as a bug some days ago, but should have ask here >> before. Could it be, that the IS_IPV4 provider validates erroneous >> IPv4&#

[web2py:35075] borken IPV4 validator?

2009-11-11 Thread Frederik Wagner
Hi .*, I already filed it as a bug some days ago, but should have ask here before. Could it be, that the IS_IPV4 provider validates erroneous IPv4's? Reproduction in the shell: 1. type: a=IS_IPV4() 2. type e.g.: a('123.123') which gives a validated output ('123.123', None), also an IP like '

[web2py:35071] Re: Validator IS_IN_DB display string from joined tables

2009-11-11 Thread Frederik Wagner
great! thanks a lot! On Tue, Nov 10, 2009 at 6:20 PM, mdipierro wrote: > > It seems I was wrong. This is not possible but not diffciult to > implement. Give me a couple of days. > > On Nov 10, 10:15 am, Frederik Wagner wrote: >> thanks for the fast reply, but it

[web2py:35035] Re: Validator IS_IN_DB display string from joined tables

2009-11-10 Thread Frederik Wagner
self._execute = lambda *a, **b: self._cursor.execute(*a, **b) OperationalError: no such column: dog.owner_name Actually, why is it not possible to do a db.walk.dog.requires = IS_IN_DB(db,'dog.id','%(name)s by %(owner.name)s') directly? probably I'm missing some

[web2py:35012] Validator IS_IN_DB display string from joined tables

2009-11-10 Thread Frederik Wagner
Hi .*, is there a possibility in the Validator IS_IN_DB to have the display string show attributes from multiple (joined) tables? E.g.: If I say somthing like IS_IN_DB( db( (table1.id == table2.id_table1) , 'table1.id', '%(table1.attribute)s %(table2.attribute)s') It tried somthing like this,

[web2py:34948] Validators during db.insert

2009-11-09 Thread Frederik Wagner
Hi .*, is there a way of making web2py run the validators configured in the model on a dataset inserted via a direct db.table.insert statement? It looks like I'm able to insert any kind of data, it's validated... Thanks and Bye, Frederik --~--~-~--~~~---~--~~ You