摘要: class MyModel(models.Model): foo = models.BooleanField() # Wrong! Don't do this! def clean_fields(self, exclude=None): # 指定某些字段排除验证 # Bah! Forgetting 阅读全文
posted @ 2022-10-28 16:04 悠然采 阅读(12) 评论(0) 推荐(0) 编辑
摘要: models.py class Child(models.Model): name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) grade = models.CharField(max 阅读全文
posted @ 2022-10-28 15:59 悠然采 阅读(26) 评论(0) 推荐(0) 编辑