def validate_not_spaces(value):
    if value.strip() == '':
        raise ValidationError('You must provide more than just whitespace.')


class Message(models.Model):
    msg = models.CharField(max_length=150, blank=False, validators=[
        validate_not_spaces])
Django - how to set blank = False, required = False