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'),
})
评论列表
文章目录