author | Florent <florent@secondweb.fr> |
Fri, 17 Apr 2009 08:52:05 +0200 | |
branch | tls-sprint |
changeset 1387 | 4af48b1aaf29 |
parent 1132 | 96752791c2b6 |
child 1802 | d628defebc17 |
permissions | -rw-r--r-- |
0 | 1 |
"""cubicweb-ctl commands and command handlers common to twisted/modpython |
2 |
web configuration |
|
3 |
||
4 |
:organization: Logilab |
|
601
a9e65aff3049
ask if anonymous should be allowed, configure accordingly
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
5 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
0 | 6 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
7 |
""" |
|
8 |
__docformat__ = "restructuredtext en" |
|
9 |
||
601
a9e65aff3049
ask if anonymous should be allowed, configure accordingly
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
10 |
from cubicweb.toolsutils import CommandHandler, confirm |
0 | 11 |
|
12 |
||
13 |
class WebCreateHandler(CommandHandler): |
|
14 |
cmdname = 'create' |
|
15 |
||
16 |
def bootstrap(self, cubes, inputlevel=0): |
|
17 |
"""bootstrap this configuration""" |
|
18 |
print '** generic web configuration' |
|
19 |
config = self.config |
|
20 |
if config.repo_method == 'pyro': |
|
21 |
print |
|
22 |
print '** repository server configuration' |
|
23 |
print '-' * 72 |
|
24 |
config.input_config('pyro-client', inputlevel) |
|
601
a9e65aff3049
ask if anonymous should be allowed, configure accordingly
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
25 |
if confirm('allow anonymous access', False): |
1132 | 26 |
config.global_set_option('anonymous-user', 'anon') |
27 |
config.global_set_option('anonymous-password', 'anon') |
|
601
a9e65aff3049
ask if anonymous should be allowed, configure accordingly
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
28 |
|
0 | 29 |
def postcreate(self): |
30 |
"""hooks called once application's initialization has been completed""" |
|
31 |