@classmethod
    def add_models_from_module(cls, model_module, use_module_name=False,
                               exclude_model_types=None,
                               model_methods=ALL_MODEL_METHODS, recurse=False):
        logging.info("adding models from module %s", model_module)
        if(not exclude_model_types):
            exclude_model_types = []
        if(isinstance(model_module, basestring)):
            model_module = __import__(model_module)
        module_name = ""
        if(use_module_name):
            module_name = get_type_name(model_module) + "."
        for obj_name in dir(model_module):
            obj = getattr(model_module, obj_name)
            if(isinstance(obj, types.ModuleType)):
                # only import "nested" modules, otherwise we get the whole
                # world and bad things happen
                if(recurse and get_type_name(obj).startswith(
                    get_type_name(model_module) + ".")):
                    cls.add_models_from_module(obj, use_module_name,
                                               exclude_model_types,
                                               model_methods, recurse)
            elif(isinstance(obj, type) and issubclass(obj, db.Model) and
                 (obj not in exclude_model_types)):
                model_name = module_name + get_type_name(obj)
                cls.add_model(model_name, obj, model_methods)
Adds all models from the given module to this request handler.
dataset/ETHPy150Open jahlborn/appengine-rest-server/src/main/python/rest/__init__.py/Dispatcher.add_models_from_module