Re: [web2py] Re: Vote for a new logo

2010-10-14 Thread Adrian Klaver
dness sake, give it a rest. The bandwith devoted to this issue is way out of proportion to its importance. This calls for a Benevolent Dictator. Let Massimo choose a logo and then lets move on. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Did anybody notice oracle bought Sun?

2010-10-11 Thread Adrian Klaver
in the Public Domain. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Did anybody notice oracle bought Sun?

2010-10-11 Thread Adrian Klaver
On Monday 11 October 2010 6:12:44 am mdipierro wrote: > The sqlite poeple should move to gdbm > As far as I can tell that whole message was about Oracle combining Sqlite with BDB for their own use. Sqlite has its own storage engine and I do not see anything changing there. -- Adrian

Re: [web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Adrian Klaver
ve him know about it. Furthermore 7.4.x is past end of life and there will not be anymore patches for it. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: timestamp update from a crud form

2010-09-30 Thread Adrian Klaver
sers , would recommend me to store the submit time instead of the form creation time in my DB. Do not specify a default in the model. Instead let the database handle it. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Adrian Klaver
7; always), off (reject always), and safe_encoding (allow only if client encoding does not allow ASCII \ within a multibyte character). safe_encoding is the default setting. " -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-31 Thread Adrian Klaver
SQL standard function and is available in all the SQL dbs I know of. This means portability is maintained no only within Web2py but with any other app that will be hitting the database. Thanks for working on this. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread Adrian Klaver
and store sessions and tickets there ### or use the following lines to store sessions in Memcache # from gluon.contrib.memdb import MEMDB # from google.appengine.api.memcache import Client # session.connect(request, response, db = MEMDB(Client())) else: # else use a normal relational database db = DAL('sqlite://storage.sqlite') # if -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-29 Thread Adrian Klaver
le. Why? How is this > different in practice than doing ``default=request.now``? > > Massimo > Blame it on not enough coffee, but I seem to be missing what you are getting at in the above :) -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-29 Thread Adrian Klaver
HAR(50) UNIQUE NOT NULL, > content TEXT NOT NULL > ) > > This would allow you to do simple inserts like the following and have > them work as expected (optimize when optimization is needed): > > db.message.insert(short_description=text, content=text) > Or db.message.insert(short_description=text[:50], content=text) and maintain compatibility. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-29 Thread Adrian Klaver
in insert query = self._insert(**fields) File "/home/aklaver/software_projects/w2py/web2py/gluon/sql.py", line 2004, in _insert sql_v = ', '.join(vs) TypeError: sequence item 0: expected string, Expression found Thanks, -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-28 Thread Adrian Klaver
/aklaver/software_projects/w2py/web2py/gluon/validators.py", line 2023, in formatter year = value.year AttributeError: 'Expression' object has no attribute 'year' > > So perhaps this should go in the FAQ. > -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-28 Thread Adrian Klaver
RY KEY AUTOINCREMENT, date_default DATE NOT NULL DEFAULT CURRENT_DATE, txt_fld TEXT ); sqlite> insert into default_test(id) values(1); sqlite> select * from default_test; 1|2010-08-28| Thanks very much for this, -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-27 Thread Adrian Klaver
est( id INTEGER PRIMARY KEY AUTOINCREMENT, date_default DATE, txt_fld TEXT ); No DEFAULT on the field. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: Field default

2010-08-27 Thread Adrian Klaver
ver/software_projects/w2py/web2py/gluon/sql.py", line 2548, in __eq__ return Query(self, '=', value) File "/home/aklaver/software_projects/w2py/web2py/gluon/sql.py", line 2972, in __init__ left._db._translator['is null']) AttributeError: 'NoneType' object has no attribute '_translator' -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Field default

2010-08-27 Thread Adrian Klaver
;: 'NOT NULL > DEFAULT %(default)s','substring': > 'SUBSTR(%(field)s,%(pos)s,%(length)s)', 'primarykey': 'PRIMARY > KEY (%s)'}, > > Yes and no. That is how the DEFAULT clause is constructed using the string passed to the default argument in Field() ex: Field('grade_date','date',default='2010/8/27',required=True,notnull=True) becomes; grade_date DATE NOT NULL DEFAULT '2010-08-27' The problem is CURRENT_DATE is not a string but an SQL function. If I include it as a string then the default becomes the string literal 'CURRENT_DATE'. If I do not quote it as string then Python complains because it is not a declared variable. Thanks, -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Field default

2010-08-27 Thread Adrian Klaver
mn. What it comes down to is whether I stick with DAL managing everything for the benefit of the migrate feature or manage the schema in the background myself and give up on migrate. That is something that remains to be determined. Thanks, -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Field default

2010-08-27 Thread Adrian Klaver
What I am looking for is a way to supply database specific variables to the table creation process. I would like to end up with the field in the database having the definition: grade_date DATE NOT NULL DEFAULT CURRENT_DATE This would make the DEFAULT have meaning outside of the framework. -- Adrian Klaver adrian.kla...@gmail.com

[web2py] Field default

2010-08-27 Thread Adrian Klaver
the table. At this point I am unclear as to whether default is associated with the table or the form. Thanks, -- Adrian Klaver adrian.kla...@gmail.com

[web2py] Sqlite string type

2010-08-27 Thread Adrian Klaver
TEXT" then that column has TEXT affinity. Notice that the type VARCHAR contains the string "CHAR" and is thus assigned TEXT affinity." Not a big issue, just would make cross database movements easier. Thanks, -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: nice model, weird things

2010-08-23 Thread Adrian Klaver
On Monday 23 August 2010 2:02:53 pm mdipierro wrote: > http://web2py.com/book/default/chapter/03?search=would+be+automatic > Thanks. I was looking in the wrong place, DAL and Form sections. -- Adrian Klaver adrian.kla...@gmail.com

Re: [web2py] Re: nice model, weird things

2010-08-23 Thread Adrian Klaver
r) ) I have been following along and I wonder is this documented somewhere? I never would have made the connection between an optional format representation and validation :) -- Adrian Klaver adrian.kla...@gmail.com