def _package_activity_query(package_id):
 import ckan.model as model
 q = model.Session.query(model.Activity)
 q = q.filter_by(object_id=package_id)
 return q

def _package_activity_query ( package_id ) : import ckan . model as model q = model . Session . query ( model . Activity ) q = q . filter_by ( object_id = package_id ) return q
return an sqlalchemy query for all activities about package_id .