This commit is contained in:
27942
2026-01-14 11:01:02 +08:00
parent 38c2e4267d
commit 875d5c88b4
7 changed files with 89 additions and 48 deletions

View File

@@ -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