@core_helper
def follow_button(obj_type, obj_id):
 obj_type = obj_type.lower()
 assert (obj_type in _follow_objects)
 if c.user:
  context = {'model': model, 'session': model.Session, 'user': c.user}
  action = ('am_following_%s' % obj_type)
  following = logic.get_action(action)(context, {'id': obj_id})
  return snippet('snippets/follow_button.html', following=following, obj_id=obj_id, obj_type=obj_type)
 return ''

@ core_helper def follow_button ( obj_type , obj_id ) : obj_type = obj_type . lower ( ) assert ( obj_type in _follow_objects ) if c . user : context = { 'model' : model , 'session' : model . Session , 'user' : c . user } action = ( 'am_following_%s' % obj_type ) following = logic . get_action ( action ) ( context , { 'id' : obj_id } ) return snippet ( 'snippets/follow_button.html' , following = following , obj_id = obj_id , obj_type = obj_type ) return ''
return a follow button for the given object type and id .