equal
deleted
inserted
replaced
54 if len(modes) != 1: |
54 if len(modes) != 1: |
55 raise ConfigurationError('unable to guess configuration from %r %s' |
55 raise ConfigurationError('unable to guess configuration from %r %s' |
56 % (directory, modes)) |
56 % (directory, modes)) |
57 return modes[0] |
57 return modes[0] |
58 |
58 |
59 # XXX generate this according to the configuration (repository/all-in-one/web) |
|
60 VREGOPTIONS = [] |
|
61 for registry in ('etypes', 'hooks', 'controllers', 'actions', 'components', |
|
62 'views', 'boxes', 'contentnavigation', 'urlrewriting', |
|
63 'facets'): |
|
64 VREGOPTIONS.append(('disable-%s'%registry, |
|
65 {'type' : 'csv', 'default': (), |
|
66 'help': 'list of identifier of application objects from the %s registry to disable'%registry, |
|
67 'group': 'appobjects', 'inputlevel': 2, |
|
68 })) |
|
69 VREGOPTIONS = tuple(VREGOPTIONS) |
|
70 |
59 |
71 # persistent options definition |
60 # persistent options definition |
72 PERSISTENT_OPTIONS = ( |
61 PERSISTENT_OPTIONS = ( |
73 ('encoding', |
62 ('encoding', |
74 {'type' : 'string', |
63 {'type' : 'string', |
155 CUBES_DIR = join(CW_SOFTWARE_ROOT, '../cubes') |
144 CUBES_DIR = join(CW_SOFTWARE_ROOT, '../cubes') |
156 else: |
145 else: |
157 mode = 'installed' |
146 mode = 'installed' |
158 CUBES_DIR = '/usr/share/cubicweb/cubes/' |
147 CUBES_DIR = '/usr/share/cubicweb/cubes/' |
159 |
148 |
160 options = VREGOPTIONS + ( |
149 options = ( |
161 ('log-threshold', |
150 ('log-threshold', |
162 {'type' : 'string', # XXX use a dedicated type? |
151 {'type' : 'string', # XXX use a dedicated type? |
163 'default': 'ERROR', |
152 'default': 'ERROR', |
164 'help': 'server\'s log level', |
153 'help': 'server\'s log level', |
165 'group': 'main', 'inputlevel': 1, |
154 'group': 'main', 'inputlevel': 1, |
199 {'type' : 'yn', |
188 {'type' : 'yn', |
200 'default': False, |
189 'default': False, |
201 'help': "don't display actual email addresses but mangle them if \ |
190 'help': "don't display actual email addresses but mangle them if \ |
202 this option is set to yes", |
191 this option is set to yes", |
203 'group': 'email', 'inputlevel': 2, |
192 'group': 'email', 'inputlevel': 2, |
|
193 }), |
|
194 ('disable-appobjects', |
|
195 {'type' : 'csv', 'default': (), |
|
196 'help': 'comma separated list of identifiers of application objects (<registry>.<oid>) to disable', |
|
197 'group': 'appobjects', 'inputlevel': 2, |
204 }), |
198 }), |
205 ) |
199 ) |
206 # static and class methods used to get application independant resources ## |
200 # static and class methods used to get application independant resources ## |
207 |
201 |
208 @staticmethod |
202 @staticmethod |