글주소: http://tibyte.kr/274
Django에서 MySQL이나 MariaDB를 사용할 때 해당 데이터베이스가 Strict Mode가 아니면
"MySQL Strict Mode is not set for database connection 'default'" 라는 경고가 발생한다.
프로젝트명/settings.py의 DATABASES 설정 부분에서 OPTIONS에
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", |
를 추가하면 된다.
참고 : http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict
댓글을 다는 공간입니다. (로그인하지 않아도 댓글을 남길 수 있습니다.)