def add_to_project(self, project, next):
        """
        Gives the aggregate a chance to request additional information for a
        project. This method should return a URL to redirect to where the
        user can create or update the additional information the aggregate
        needs. When done, the view at that URL should use the
        C{give_permission} function to give the project
        the "can_use_aggregate" permission::
            
            from expedient.common.permissions.shortcuts import \
                give_permission_to
            
            give_permission_to("can_use_aggregate", self.as_leaf_class(), project)
        
        and then it should redirect to C{next}.
        
        If no extra information is needed, this function can return C{next},
        instead of a custom URL, but it still needs to give the project the
        "can_use_aggregate" permission.
        
        Unless overridden in a subclass, this function will look for a url
        with name <app_name>_aggregate_project_add by reversing the name with
        it parameters 'agg_id' and 'proj_id'. It will append '?next=<next>' to
        the URL if found. Otherwise, it simply gives the permission to the
        project and returns C{next}.
        """
        
        logger.debug("adding aggregate to project")
        
        must_have_permission("user", self.as_leaf_class(), "can_use_aggregate")
        
        prefix = self.__class__.get_url_name_prefix()
        try:
            return reverse(prefix % "%s_aggregate_project_add",
                           kwargs={'agg_id': self.id,
                                   'proj_id': project.id})+"?next=%s" % next
        except NoReverseMatch:
            logger.debug("Giving permission to use aggregate to %s" % project)
            give_permission_to("can_use_aggregate", self.as_leaf_class(), project)
            return next
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/clearinghouse/aggregate/models.py/Aggregate.add_to_project/swapped operands of `%`