Example #1
0
 def __init__(self, session_aware_instance):
     # TODO: By the way session could be disabled. How do we 
     # handle that?
     # TODO: check if session type exists. Maybe disable it if type is not
     # defined. We need to inform the error here
     session_handler_class = get_class_from_config(
         firenado.conf.session['handlers'][firenado.conf.session['type']]
     )
     self.session_aware_instance = session_aware_instance
     self.session_handler = session_handler_class(self)
     self.session_handler.set_settings({})
     self.session_handler.configure()
     encoder_class = get_class_from_config(
         firenado.conf.session['encoders'][
             firenado.conf.session['encoder']
         ]
     )
     self.session_encoder = encoder_class()
Example #2
0
 def __load_components(self):
     """ Loads all enabled components registered into the components
     conf.
     """
     for key, value in firenado.conf.components.iteritems():
         if value['enabled']:
             component_class = get_class_from_config(value)
             self.components[key] = component_class(key, self,
                                                    value['config'])
             self.components[key].process_config()
Example #3
0
 def __load_components(self):
     """ Loads all enabled components registered into the components
     conf.
     """
     for key, value in iteritems(firenado.conf.components):
         if value["enabled"]:
             component_class = get_class_from_config(value)
             self.components[key] = component_class(key, self)
             if self.components[key].get_config_file():
                 comp_config_file = os.path.join(
                     firenado.conf.APP_CONFIG_PATH, self.components[key].get_config_file()
                 )
                 if os.path.isfile(comp_config_file):
                     self.components[key].conf = firenado.conf.load_yaml_config_file(comp_config_file)
                     self.components[key].process_config()
                     self.components[key].initialize()