yes, but it wont works
i have this loop
users = db(db.auth_user.id > 0).select()
for i in users:
db(db.auth_user.id == i.id).update(a = 'b')
but nothing is updated
it also failed for i.update_record(a = 'b')
with pickle when I do this:
serialized = pickle.dumps(db)
It gets this error
File "/usr/lib/python2.7/pickle.py", line 1374, in dumps
Pickler(file, protocol).dump(obj)
File "/usr/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib/python2.7/pickle.py", line 306, in save
rv = reduce(self.proto)
File "/usr/lib/python2.7/copy_reg.py", line 74, in _reduce_ex
getstate = self.__getstate__
File "/opt/web2py/gluon/dal.py", line 4511, in __getattr__
return self[key]
File "/opt/web2py/gluon/dal.py", line 4505, in __getitem__
return dict.__getitem__(self, str(key))
KeyError: '__getstate__'
Francisco Costa
http://franciscocosta.com
On Tue, Dec 6, 2011 at 12:59, Roberto De Ioris <[email protected]> wrote:
>
> Il giorno 06/dic/2011, alle ore 13:47, Francisco Costa ha scritto:
>
> > well, I've imported gluon and created a db object
> > but I can't update values, just select or insert new ones…
>
> Can't you simply pass the primary key of your record ?
>
> >
> > Francisco Costa
> > http://franciscocosta.com
> >
>
> --
> Roberto De Ioris
> http://unbit.it
> JID: [email protected]
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi