-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(FasterRunner): upgrade django version from 2.2.28 to 4.1, repla…
…ce mysqlclient by pymysql (#171) * chore(FasterRunner): upgrade django version from 2.2.28 to 4.1, replace mysqlclient by pymysql * fix(requirements): add drf-yasg deps * fix(requirements): add drf-yasg deps * fix(requirements): add pymysql * fix: collect static cannot import name 'ugettext_lazy'
- Loading branch information
1 parent
709ac6d
commit 6a57313
Showing
9 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pymysql | ||
|
||
# 替换mysqlclient | ||
pymysql.version_info = (1, 4, 6, "final", 0) # 修改版本号为兼容版本 | ||
pymysql.install_as_MySQLdb() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,13 @@ | |
# @File: __init__.py.py | ||
# @Time : 2019/6/14 17:05 | ||
# @Email: [email protected] | ||
# @Software: PyCharm | ||
# @Software: PyCharm | ||
|
||
# 兼容已经移除的方法 | ||
import django | ||
from django.utils.encoding import smart_str | ||
django.utils.encoding.smart_text = smart_str | ||
|
||
from django.utils.translation import gettext_lazy | ||
django.utils.translation.ugettext = gettext_lazy | ||
django.utils.translation.ugettext_lazy = gettext_lazy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,6 @@ | |
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters