Код: Выделить всё
def configure_proxy:
proxy.obj.require_commit = False
proxy.obj.autocommit = True
proxy.obj.commit_select = False
proxy.obj.connect_kwargs["autocommit"] = True
Код: Выделить всё
def _connect(self):
if mysql is None:
raise ImproperlyConfigured('MySQL driver not installed!')
conn = mysql.connect(db=self.database, autocommit=True,
**self.connect_params)
return conn
def _set_autocommit(self, autocommit):
"""Prevent Peewee from toggling autocommit mode"""
pass
def configure_proxy:
proxy.obj.require_commit = False
proxy.obj.commit_select = False
Вопрос
- правильный ли вышеописанный подход?
Подробнее здесь: https://stackoverflow.com/questions/798 ... autocommit
Мобильная версия