def uses_requirement(requirement, field):
 if (hasattr(field.requires, 'other') or (requirement in str(field.requires))):
  if hasattr(field.requires, 'other'):
   if (requirement in str(field.requires.other)):
    return True
  elif (requirement in str(field.requires)):
   return True
 return False

def uses_requirement ( requirement , field ) : if ( hasattr ( field . requires , 'other' ) or ( requirement in str ( field . requires ) ) ) : if hasattr ( field . requires , 'other' ) : if ( requirement in str ( field . requires . other ) ) : return True elif ( requirement in str ( field . requires ) ) : return True return False
check if a given database field uses the specified requirement @todo: deprecate .