make ensure_ascii=False
This commit is contained in:
parent
cab56594d5
commit
23cbd12570
@ -100,7 +100,7 @@ async def upgrade(ctx: Context):
|
||||
|
||||
with open(file_path, "w") as f:
|
||||
content["migrate"] = True
|
||||
json.dump(content, f, indent=4)
|
||||
json.dump(content, f, indent=4, ensure_ascii=False)
|
||||
click.secho(f"Success upgrade {file}", fg=Color.green)
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ async def downgrade(ctx: Context):
|
||||
continue
|
||||
with open(file_path, "w") as f:
|
||||
content["migrate"] = False
|
||||
json.dump(content, f, indent=4)
|
||||
json.dump(content, f, indent=4, ensure_ascii=False)
|
||||
return click.secho(f"Success downgrade {file}", fg=Color.green)
|
||||
|
||||
|
||||
|
@ -80,7 +80,7 @@ class Migrate:
|
||||
"migrate": False,
|
||||
}
|
||||
with open(os.path.join(cls.migrate_location, filename), "w") as f:
|
||||
json.dump(content, f, indent=4)
|
||||
json.dump(content, f, indent=4, ensure_ascii=False)
|
||||
return filename
|
||||
|
||||
@classmethod
|
||||
@ -128,7 +128,7 @@ class Migrate:
|
||||
|
||||
@classmethod
|
||||
def cp_models(
|
||||
cls, app: str, model_files: List[str], old_model_file,
|
||||
cls, app: str, model_files: List[str], old_model_file,
|
||||
):
|
||||
"""
|
||||
cp currents models to old_model_files
|
||||
@ -177,7 +177,7 @@ class Migrate:
|
||||
|
||||
@classmethod
|
||||
def _diff_models(
|
||||
cls, old_models: Dict[str, Type[Model]], new_models: Dict[str, Type[Model]], upgrade=True
|
||||
cls, old_models: Dict[str, Type[Model]], new_models: Dict[str, Type[Model]], upgrade=True
|
||||
):
|
||||
"""
|
||||
diff models and add operators
|
||||
|
Loading…
x
Reference in New Issue
Block a user