Python 自定义命令 BaseCommand 提示: Using proactor: IocpProactor
資深大佬 : luckyy 21
class Command(BaseCommand): def handle(self, *args, **options): with open(‘user.json’, ‘a’, encoding=’utf-8′) as f: f.write(json.dumps({‘name’: name, ‘phone’: phone, ‘sex’: sex_code[sex], ‘birthday’: birthday, ‘profession’: profession_code[profession], ‘region’: region.code, ‘corporation_type’: corporation_code[corporation_type], ‘corporation’: corporation, ‘title’: title_code[title] }, ensure_ascii=False) + ‘n’)
大佬有話說 (0)