playlists/views.py
def _get_entity_attr(entity, attr, *getattr_args):
    """gets the value of an attribute on an entity.

    if the value is an orphaned reference then return
    the string __bad_reference__ instead
    """
    try:
        if len(getattr_args):
            return getattr(entity, attr, *getattr_args)
        else:
            return getattr(entity, attr)
    except datastore_errors.Error, exc:
        if str(exc).startswith('ReferenceProperty failed to be resolved'):
            log.warning("Could not resolve reference property %r on %r at %s" % (
                                                            attr, entity, entity.key()))
            return '__bad_reference__'
        else:
            # something else happened
            raise
gets the value of an attribute on an entity.

    if the value is an orphaned reference then return
    the string __bad_reference__ instead
    
gets the value of an attribute on an entity.
if the value is an orphaned reference then return
the string __bad_reference__ instead
gets the value of an attribute on an entity . if the value is an orphaned reference then return the string __bad_reference__ instead
def _get_entity_attr(entity, attr, *getattr_args):
    try:
        if len(getattr_args):
            return getattr(entity, attr, *getattr_args)
        else:
            return getattr(entity, attr)
    except datastore_errors.Error, exc:
        if str(exc).startswith('ReferenceProperty failed to be resolved'):
            log.warning("Could not resolve reference property %r on %r at %s" % (
                                                            attr, entity, entity.key()))
            return '__bad_reference__'
        else:
            raise
def _get_entity_attr ( entity , attr , * getattr_args ) : try : if len ( getattr_args ) : return getattr ( entity , attr , * getattr_args ) else : return getattr ( entity , attr ) except datastore_errors . Error , exc : if str ( exc ) . startswith ( 'ReferenceProperty failed to be resolved' ) : log . warning ( "Could not resolve reference property %r on %r at %s" % ( attr , entity , entity . key ( ) ) ) return '__bad_reference__' else : raise
gets the value of an attribute on an entity.
gets the value of an attribute on an entity .
"""gets the value of an attribute on an entity.

    if the value is an orphaned reference then return
    the string __bad_reference__ instead
    """ # something else happened
entity
attr