'Entry point for REST API
@param r: the S3Request
@param attr: controller arguments'

def apply_method(self, r, **attr):

    if (r.name == 'project'):
        representation = r.representation
        if (representation == 'html'):
            output = self.html(r, **attr)
            return output
        elif (representation == 'pdf'):
            output = self.pdf(r, **attr)
            return output
    raise HTTP(405, current.ERROR.BAD_METHOD)
