parameters: (cls, key, user=None, project_code=None)
return_statement: return value
docstring: get the value of this pref
docstring_summary: get the value of this pref
docstring_tokens: get the value of this pref
function: def get_value_by_key(cls, key, user=None, project_code=None):
          ''' get the value of this pref '''
  
          #try:
          #    from pyasm.biz import SearchTypeCache
          #    cache = SearchTypeCache.get(cls.SEARCH_TYPE)
          #except Exception:
          #    print "WARNING: Cache not enabled"
  
          # protect against database connection issues (This is called at a very
          # low level, so it needs this)
          try:
              pref_setting = cls.get_by_key(key, user, project_code)
              value = ''
              if pref_setting:
                  value = pref_setting.get_value("value")
          except DatabaseException:
              value = ''
  
          return value
function_tokens: def get_value_by_key ( cls , key , user = None , project_code = None ) : #try: #    from pyasm.biz import SearchTypeCache #    cache = SearchTypeCache.get(cls.SEARCH_TYPE) #except Exception: #    print "WARNING: Cache not enabled" # protect against database connection issues (This is called at a very # low level, so it needs this) try : pref_setting = cls . get_by_key ( key , user , project_code ) value = '' if pref_setting : value = pref_setting . get_value ( "value" ) except DatabaseException : value = '' return value