def validate_not_blank(value):
 if (not value.strip()):
  raise ValidationError('This field may not be blank.')

def validate_not_blank ( value ) : if ( not value . strip ( ) ) : raise ValidationError ( 'This field may not be blank.' )
validate that a value is not an empty string or whitespace .