Python and Django OperationalError (2006, 'MySQL server has gone away')

后端 未结 12 1725
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 15:25

Original: I have recently started getting MySQL OperationalErrors from some of my old code and cannot seem to trace back the problem. Since it was working before, I thought

12条回答
  •  独厮守ぢ
    2020-12-14 16:15

    How old is this code? Django has had databases defined in settings since at least .96. Only other thing I can think of is multi-db support, which changed things a bit, but even that was 1.1 or 1.2.

    Even if you need a special DB for certain views, I think you'd probably be better off defining it in settings.

提交回复
热议问题