Changeset 4079

Show
Ignore:
Timestamp:
01/31/08 02:19:38 (10 months ago)
Author:
chrisz
Message:

Fixed #1494: Toolbox did not run on projects using Genshi.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/turbogears/command/base.py

    r3948 r4079  
    4747        development or installed project.""" 
    4848        load_project_config(self.config) 
    49         self.dburi = turbogears.config.get("sqlobject.dburi", None) 
     49        self.dburi = config.get("sqlobject.dburi", None) 
    5050        if self.dburi and self.dburi.startswith("notrans_"): 
    5151            self.dburi = self.dburi[8:] 
     
    272272        # in it so other plugins or whatever find what they need 
    273273        # when starting even inside the toolblox 
    274         if get_package_name(): 
    275             conf = turbogears.config.config_obj( 
    276                     configfile=self.config, 
    277                     modulename="%s.config" % get_package_name()) 
    278         else: 
    279             conf = turbogears.config.config_obj(configfile=self.config) 
     274        conf = get_package_name() 
     275        conf = conf and "%s.config" % conf or None 
     276        conf = config.config_obj(configfile=self.config, modulename=conf) 
    280277 
    281278        if 'global' in conf: 
    282             turbogears.config.update({'global': conf['global']}) 
     279            config.update({'global': conf['global']}) 
    283280 
    284281        root = SecureObject(toolbox.Toolbox(), from_any_host(self.hostlist), 
     
    289286        # amend some parameters since we are running from the command 
    290287        # line in order to change port, log methods... 
    291         turbogears.config.update({"global" : { 
     288        config.update({"global" : { 
    292289            "server.socket_port" : self.port, 
    293290            "server.environment" : "development", 
     
    296293            "server.package" : "turbogears.toolbox", 
    297294            "log_debug_info_filter.on" : False, 
    298             "identity.failure_url" : "/noaccess" 
     295            "identity.failure_url" : "/noaccess", 
     296            'tg.defaultview': 'kid', 
     297            'kid.outputformat': "html default", 
     298            'kid.encoding': "utf-8" 
    299299            }}) 
    300300 
  • branches/1.1/turbogears/command/base.py

    r4056 r4079  
    4747        development or installed project.""" 
    4848        load_project_config(self.config) 
    49         self.dburi = turbogears.config.get("sqlobject.dburi", None) 
     49        self.dburi = config.get("sqlobject.dburi", None) 
    5050        if self.dburi and self.dburi.startswith("notrans_"): 
    5151            self.dburi = self.dburi[8:] 
     
    272272        # in it so other plugins or whatever find what they need 
    273273        # when starting even inside the toolblox 
    274         if get_package_name(): 
    275             conf = turbogears.config.config_obj( 
    276                     configfile=self.config, 
    277                     modulename="%s.config" % get_package_name()) 
    278         else: 
    279             conf = turbogears.config.config_obj(configfile=self.config) 
     274        conf = get_package_name() 
     275        conf = conf and "%s.config" % conf or None 
     276        conf = config.config_obj(configfile=self.config, modulename=conf) 
    280277 
    281278        if 'global' in conf: 
    282             turbogears.config.update({'global': conf['global']}) 
     279            config.update({'global': conf['global']}) 
    283280 
    284281        root = SecureObject(toolbox.Toolbox(), from_any_host(self.hostlist), 
     
    289286        # amend some parameters since we are running from the command 
    290287        # line in order to change port, log methods... 
    291         turbogears.config.update({"global" : { 
     288        config.update({"global" : { 
    292289            "server.socket_port" : self.port, 
    293290            "server.environment" : "development", 
     
    296293            "server.package" : "turbogears.toolbox", 
    297294            "log_debug_info_filter.on" : False, 
    298             "identity.failure_url" : "/noaccess" 
     295            "identity.failure_url" : "/noaccess", 
     296            'tg.defaultview': 'kid', 
     297            'kid.outputformat': "html default", 
     298            'kid.encoding': "utf-8" 
    299299            }}) 
    300300