Django生成数据表时报错

 

Django生成数据表时报错

1 WARNINGS:
2 ?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default'
3         HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-sql-mode

 

解决方法:

             在settings.py里数据库位置添加:

Django生成数据表时报错

1 'OPTIONS': {
2             'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
3 {

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-04-08
  • 2022-02-15
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-05-18
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案