Allow to pass many configuration files
issue4780 review27471002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Allow to pass many configuration files
|
||||
* Remove translate on field name of User
|
||||
* Allow to define the default mode in calendar view
|
||||
* Use 'default_rec_name' context key in Model.default_get
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ with commandline.pidfile(options):
|
||||
ssl_context = (certificate, privatekey)
|
||||
else:
|
||||
ssl_context = None
|
||||
extra_files = [options.configfile]
|
||||
extra_files = options.configfile
|
||||
for module in get_module_list():
|
||||
info = get_module_info(module)
|
||||
path = os.path.join(info['directory'], 'view', '*.xml')
|
||||
|
||||
@@ -14,6 +14,9 @@ You can start the default web server bundled in Tryton with this command line::
|
||||
The server will wait for client connections on the interface defined in the
|
||||
`web` section of the :ref:`configuration <topics-configuration>`.
|
||||
|
||||
.. note:: When using multiple config files the order is importart as last
|
||||
entered files will override the items of first files
|
||||
|
||||
WSGI server
|
||||
-----------
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ def get_parser():
|
||||
parser.add_argument('--version', action='version',
|
||||
version='%(prog)s ' + __version__)
|
||||
parser.add_argument("-c", "--config", dest="configfile", metavar='FILE',
|
||||
default=os.environ.get('TRYTOND_CONFIG'), help="specify config file")
|
||||
nargs='+', default=[os.environ.get('TRYTOND_CONFIG')],
|
||||
help='Specify configuration files')
|
||||
parser.add_argument("-v", "--verbose", action="store_true",
|
||||
dest="verbose", help="enable verbose mode")
|
||||
parser.add_argument('--dev', dest='dev', action='store_true',
|
||||
|
||||
+2
-2
@@ -70,8 +70,8 @@ class TrytonConfigParser(ConfigParser.RawConfigParser):
|
||||
def update_etc(self, configfile=os.environ.get('TRYTOND_CONFIG')):
|
||||
if not configfile:
|
||||
return
|
||||
logger.info('using %s as configuration file', configfile)
|
||||
self.read(configfile)
|
||||
read_files = self.read(configfile)
|
||||
logger.info('using %s as configuration files', ', '.join(read_files))
|
||||
|
||||
def get(self, section, option, *args, **kwargs):
|
||||
default = kwargs.pop('default', None)
|
||||
|
||||
Reference in New Issue
Block a user