-
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.
Browse files
Browse the repository at this point in the history
This reverts commit 67aa128.
- Loading branch information
1 parent
67aa128
commit aa75927
Showing
110 changed files
with
2,415 additions
and
4,213 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
# 替换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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# !/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# @Author:梨花菜 | ||
# @File: database.py | ||
# @File: database.py | ||
# @Time : 2019/6/13 17:08 | ||
# @Email: [email protected] | ||
# @Software: PyCharm | ||
|
@@ -10,16 +11,17 @@ | |
|
||
class AutoChoiceDataBase: | ||
run_system = platform.system() | ||
is_windows = run_system == "Windows" | ||
is_windows = run_system == 'Windows' | ||
|
||
def db_for_read(self, model, **hints): | ||
if self.is_windows: | ||
return "default" | ||
return 'default' | ||
else: | ||
return "remote" | ||
return 'remote' | ||
|
||
def db_for_write(self, model, **hints): | ||
if self.is_windows: | ||
return "default" | ||
return 'default' | ||
else: | ||
return "remote" | ||
return 'remote' | ||
|
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import logging | ||
import os | ||
|
||
from celery import Celery | ||
from celery.signals import after_setup_logger | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# !/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# @Author:梨花菜 | ||
# @File: database.py | ||
# @File: database.py | ||
# @Time : 2019/6/13 17:08 | ||
# @Email: [email protected] | ||
# @Software: PyCharm | ||
|
@@ -10,16 +11,17 @@ | |
|
||
class AutoChoiceDataBase: | ||
run_system = platform.system() | ||
is_windows = run_system == "Windows" | ||
is_windows = run_system == 'Windows' | ||
|
||
def db_for_read(self, model, **hints): | ||
if self.is_windows: | ||
return "default" | ||
return 'default' | ||
else: | ||
return "remote" | ||
return 'remote' | ||
|
||
def db_for_write(self, model, **hints): | ||
if self.is_windows: | ||
return "default" | ||
return 'default' | ||
else: | ||
return "remote" | ||
return 'remote' | ||
|
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
# !/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# @Author:梨花菜 | ||
# @File: __init__.py.py | ||
# @File: __init__.py.py | ||
# @Time : 2019/6/14 17:05 | ||
# @Email: [email protected] | ||
# @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 | ||
django.utils.translation.ugettext_lazy = gettext_lazy |
Oops, something went wrong.