diff --git a/VERSION b/VERSION index f2ee5998..34d96c41 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2012-01-20 11:19:18) stable +Version 1.99.4 (2012-01-20 11:23:12) stable diff --git a/gluon/contrib/populate.py b/gluon/contrib/populate.py index ade6e0f8..c1494dfd 100644 --- a/gluon/contrib/populate.py +++ b/gluon/contrib/populate.py @@ -55,7 +55,7 @@ def da_du_ma(n=4): 'pa','po','sa','so','ta','to']\ [random.randint(0,11)] for i in range(n)]) -def populate(table, n, default=True): +def populate(table, n, default=True, compute=False): ell=Learner() #ell.learn(open('20417.txt','r').read()) #ell.save('frequencies.pickle') @@ -72,6 +72,8 @@ def populate(table, n, default=True): continue elif default and field.default: record[fieldname]=field.default + elif compute and field.compute: + continue elif field.type == 'text': record[fieldname]=ell.generate(random.randint(10,100),prefix=None) elif field.type == 'boolean':