Ejemplo n.º 1
0
 def default_get_many_postprocessor(result=None, search_params=None, **kw):
     logger.info("start default_get_many_postprocessor " + model_name)
     if result:
         objects = result['objects']
         result.clear()
         b = {model_name: objects}
         result.update(b)
         logger.info(result)
         logger.info("end default_get_many_postprocessor " + model_name)
     else:
         logger.info('result is None')
Ejemplo n.º 2
0
    def post_preprocessor(data=None, **kw):
        """Accepts a single argument, `data`, which is the dictionary of
        fields to set on the new instance of the models.

        """
        logger.info(data)
        logger.info("start post_preprocessor")
        model = data[model_name]
        data.clear()
        data.update(model)
        logger.info(data)
        logger.info("end post_preprocessor")
Ejemplo n.º 3
0
def get_many_preprocessor(search_params=None, **kw):
    """Accepts a single argument, `search_params`, which is a dictionary
    containing the search parameters for the request.

    """
    pass
    logger.info("start get_many_preprocessor")
    logger.info(search_params)
    logger.info("end get_many_preprocessor")
Ejemplo n.º 4
0
def delete_single_postprocessor(was_deleted=None, **kw):
    """Accepts a single argument, `was_deleted`, which represents whether
    the instance has been deleted.

    """
    logger.info("start delete_single_postprocessor")
    pass
    logger.info(was_deleted)
    logger.info("end delete_single_postprocessor")
Ejemplo n.º 5
0
def delete_single_preprocessor(instance_id=None, **kw):
    """Accepts a single argument, `instance_id`, which is the primary key
    of the instance which will be deleted.

    """
    logger.info("start delete_single_preprocessor")
    pass
    logger.info(instance_id)
    logger.info("end delete_single_preprocessor")
Ejemplo n.º 6
0
def post_postprocessor(result=None, **kw):
    """Accepts a single argument, `result`, which is the dictionary
    representation of the created instance of the models.

    """
    logger.info("start post_postprocessor")
    logger.info(result)
    logger.info("end post_postprocessor")
    pass
Ejemplo n.º 7
0
    def default_put_single_preprocessor(instance_id=None, data=None, **kw):
        """Accepts two arguments, `instance_id`, the primary key of the
        instance of the models to patch, and    `data`, the dictionary of fields
        to change on the instance.

        """
        logger.info("start put_single_preprocessor")
        logger.info(data)
        model = data[model_name]
        data.clear()
        data.update(model)
        logger.info("end put_single_preprocessor")
        pass