【发布时间】:2020-01-19 10:55:41
【问题描述】:
这是我将员工资料保存到 sqlite3 的代码。我可能会错过什么?
....................
def save(self):
super(StaffProfile, self).save()
img = Image.open(self.image.path)
if img.height > 300 or img.width > 300:
output_size = (300, 300)
img.thumbnail(output_size)
img.save(self.image.path)
【问题讨论】: