Re: Pickling a dictionary into a PostgreSQL database?

2009-01-22 Thread teth
wanted to be sure. On Jan 21, 10:07 am, Torsten Bronger wrote: > Hallöchen! > > teth writes: > > Using str(pickle.dumps()) and thepickle.loads(str()) works > > perfectly. > > Unfortunately, I had to realise that it is not so simple due to > <http://bugs.python.org/issu

Re: Pickling a dictionary into a PostgreSQL database?

2009-01-18 Thread teth
is very fast to run if rating['froob'] == 1. Also it simplifies the database models. On Jan 15, 1:00 pm, Torsten Bronger wrote: > Hallöchen! > > teth writes: > > [...] > > > When I try and load the pickled string from thedatabaseit gives me > > the f

Pickling a dictionary into a PostgreSQL database?

2009-01-15 Thread teth
Hello, I pickled a dictionary and stored it in my database like this: article.rating = article.rating + 1 ratings[request.user.username] = 1 article.rating_list = pickle.dumps(ratings) article.save() ratings looks like this: {'froob': 1, 'alik': 1, 'teth': 1} W