(self, action, item_type='actor')
return {
            'id': self.get_uri(action, obj),
            'url': self.get_url(action, obj),
            'objectType': ContentType.objects.get_for_model(obj).name,
            'displayName': str(obj)
        }
Returns a formatted dictionary for an individual item based on the action and item_type.
Returns a formatted dictionary for an individual item based on the action and item_type.
Returns a formatted dictionary for an individual item based on the action and item_type .
def format_item(self, action, item_type='actor'):
        """
        Returns a formatted dictionary for an individual item based on the action and item_type.
        """
        obj = getattr(action, item_type)
        return {
            'id': self.get_uri(action, obj),
            'url': self.get_url(action, obj),
            'objectType': ContentType.objects.get_for_model(obj).name,
            'displayName': str(obj)
        }
def format_item ( self , action , item_type = 'actor' ) : obj = getattr ( action , item_type ) return { 'id' : self . get_uri ( action , obj ) , 'url' : self . get_url ( action , obj ) , 'objectType' : ContentType . objects . get_for_model ( obj ) . name , 'displayName' : str ( obj ) }