Saving Python Pickled objects in MySQL db

后端 未结 4 1669
北海茫月
北海茫月 2020-12-14 22:55

I am pickling Python Objects in Django and saving it in MySQL db. So far i have followed these simple rules:

  1. cPickle.dumps(object) #to convert

4条回答
  •  [愿得一人]
    2020-12-14 23:13

    Newtover's answer is probably the correct one, but have a look at

    https://github.com/bradjasper/django-pickledfield

    It really saved me some time, and can store pretty much anything you want.

提交回复
热议问题