def activity_stream(context, stream_type, *args, **kwargs):
 if (stream_type == 'model'):
  stream_type = 'model_actions'
 if (not hasattr(Action.objects, stream_type)):
  raise TemplateSyntaxError(('Action manager has no attribute: %s' % stream_type))
 ctxvar = kwargs.pop('as', 'stream')
 context[ctxvar] = getattr(Action.objects, stream_type)(*args, **kwargs)
 return ''

def activity_stream ( context , stream_type , * args , ** kwargs ) : if ( stream_type == 'model' ) : stream_type = 'model_actions' if ( not hasattr ( Action . objects , stream_type ) ) : raise TemplateSyntaxError ( ( 'Action manager has no attribute: %s' % stream_type ) ) ctxvar = kwargs . pop ( 'as' , 'stream' ) context [ ctxvar ] = getattr ( Action . objects , stream_type ) ( * args , ** kwargs ) return ''
renders an activity stream as a list into the templates context .