def get_handlers():
 if hasattr(settings, 'RAPIDSMS_HANDLERS'):
  return [import_class(name) for name in settings.RAPIDSMS_HANDLERS]
 warn('Please set RAPIDSMS_HANDLERS to the handlers that should be installed. The old behavior of installing all defined handlers, possibly modified by INSTALLED_HANDLERS and/or EXCLUDED_HANDLERS, is deprecated and will be removed', DeprecationWarning)
 handlers = _find_handlers(_apps())
 if (hasattr(settings, 'INSTALLED_HANDLERS') and (settings.INSTALLED_HANDLERS is not None)):
  copy = [handler for handler in handlers]
  handlers = []
  while (len(copy) > 0):
   for prefix in settings.INSTALLED_HANDLERS:
    if copy[(-1)].__module__.startswith(prefix):
     handlers.append(copy[(-1)])
     break
   copy.pop()
 if (hasattr(settings, 'EXCLUDED_HANDLERS') and (settings.EXCLUDED_HANDLERS is not None)):
  for prefix in settings.EXCLUDED_HANDLERS:
   handlers = [handler for handler in handlers if (not handler.__module__.startswith(prefix))]
 return handlers

def get_handlers ( ) : if hasattr ( settings , 'RAPIDSMS_HANDLERS' ) : return [ import_class ( name ) for name in settings . RAPIDSMS_HANDLERS ] warn ( 'Please set RAPIDSMS_HANDLERS to the handlers that should be installed. The old behavior of installing all defined handlers, possibly modified by INSTALLED_HANDLERS and/or EXCLUDED_HANDLERS, is deprecated and will be removed' , DeprecationWarning ) handlers = _find_handlers ( _apps ( ) ) if ( hasattr ( settings , 'INSTALLED_HANDLERS' ) and ( settings . INSTALLED_HANDLERS is not None ) ) : copy = [ handler for handler in handlers ] handlers = [ ] while ( len ( copy ) > 0 ) : for prefix in settings . INSTALLED_HANDLERS : if copy [ ( - 1 ) ] . __module__ . startswith ( prefix ) : handlers . append ( copy [ ( - 1 ) ] ) break copy . pop ( ) if ( hasattr ( settings , 'EXCLUDED_HANDLERS' ) and ( settings . EXCLUDED_HANDLERS is not None ) ) : for prefix in settings . EXCLUDED_HANDLERS : handlers = [ handler for handler in handlers if ( not handler . __module__ . startswith ( prefix ) ) ] return handlers
return a list of the handler classes to use in the current project .