haha
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
# 使用 PyMySQL 替代 mysqlclient(必须在导入 Django 之前)
|
||||
import pymysql
|
||||
|
||||
# 覆盖 PyMySQL 的版本信息以满足 Django 4.2+ 的要求
|
||||
# Django 4.2+ 要求 mysqlclient 2.2.1 或更高版本
|
||||
pymysql.version_info = (2, 2, 1, "final", 0)
|
||||
pymysql.install_as_MySQLdb()
|
||||
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user