예제 #1
0
파일: processor.py 프로젝트: chengjf/db-api
 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')
예제 #2
0
파일: processor.py 프로젝트: chengjf/db-api
    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")
예제 #3
0
파일: processor.py 프로젝트: chengjf/db-api
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")
예제 #4
0
파일: processor.py 프로젝트: chengjf/db-api
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")
예제 #5
0
파일: processor.py 프로젝트: chengjf/db-api
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")
예제 #6
0
파일: processor.py 프로젝트: chengjf/db-api
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
예제 #7
0
파일: processor.py 프로젝트: chengjf/db-api
    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