models.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:2017.djangocon.eu 作者: djangocon 项目源码 文件源码
def clean(self):
        # ensure talk and workshop are NOT filled at the same time
        if self.talk and self.workshop:
            message = _('Please, select either a Talk or a Workshop, not both.')
            raise ValidationError({
                'talk': ValidationError(message=message, code='invalid'),
                'workshop': ValidationError(message=message, code='invalid'),
            })
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号