Show More
@@ -50,14 +50,15 b' cache_dir = %(here)s/data' | |||
|
50 | 50 |
|
|
51 | 51 |
|
|
52 | 52 |
|
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
53 | ||
|
54 | beaker.cache.super_short_term.type=memory | |
|
55 | beaker.cache.super_short_term.expire=10 | |
|
55 | 56 | |
|
56 | 57 |
|
|
57 | 58 |
|
|
58 | 59 | |
|
59 |
|
|
|
60 |
|
|
|
60 | beaker.cache.long_term.type=memory | |
|
61 | beaker.cache.long_term.expire=36000 | |
|
61 | 62 | |
|
62 | 63 |
|
|
63 | 64 |
|
@@ -8,6 +8,9 b' 1.0.0rc4 (**2010-10-12**)' | |||
|
8 | 8 | - fixed python2.5 missing simplejson imports (thanks to Jens BΓ€ckman) |
|
9 | 9 | - removed cache_manager settings from sqlalchemy meta |
|
10 | 10 | - added sqlalchemy cache settings to ini files |
|
11 | - validated password length and added second try of failure on paster setup-app | |
|
12 | - fixed setup database destroy prompt even when there was no db | |
|
13 | ||
|
11 | 14 | |
|
12 | 15 | 1.0.0rc3 (**2010-10-11**) |
|
13 | 16 |
@@ -17,7 +17,7 b' Setting up the application' | |||
|
17 | 17 | |
|
18 | 18 | :: |
|
19 | 19 | |
|
20 |
paster setup-app production.ini |
|
|
20 | paster setup-app production.ini | |
|
21 | 21 | |
|
22 | 22 | - This command will create all needed tables and an admin account. |
|
23 | 23 | When asked for a path You can either use a new location of one with already |
@@ -50,14 +50,15 b' cache_dir = %(here)s/data' | |||
|
50 | 50 |
|
|
51 | 51 |
|
|
52 | 52 |
|
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
53 | ||
|
54 | beaker.cache.super_short_term.type=memory | |
|
55 | beaker.cache.super_short_term.expire=10 | |
|
55 | 56 | |
|
56 | 57 |
|
|
57 | 58 |
|
|
58 | 59 | |
|
59 |
|
|
|
60 |
|
|
|
60 | beaker.cache.long_term.type=memory | |
|
61 | beaker.cache.long_term.expire=36000 | |
|
61 | 62 | |
|
62 | 63 |
|
|
63 | 64 |
|
@@ -51,14 +51,15 b' app_instance_uuid = ${app_instance_uuid}' | |||
|
51 | 51 |
|
|
52 | 52 |
|
|
53 | 53 |
|
|
54 | beaker.cache.long_term.type=memory | |
|
55 | beaker.cache.long_term.expire=36000 | |
|
54 | ||
|
55 | beaker.cache.super_short_term.type=memory | |
|
56 | beaker.cache.super_short_term.expire=10 | |
|
56 | 57 | |
|
57 | 58 |
|
|
58 | 59 |
|
|
59 | 60 | |
|
60 |
|
|
|
61 |
|
|
|
61 | beaker.cache.long_term.type=memory | |
|
62 | beaker.cache.long_term.expire=36000 | |
|
62 | 63 | |
|
63 | 64 |
|
|
64 | 65 |
|
@@ -56,7 +56,6 b' class DbManage(object):' | |||
|
56 | 56 | log.info('checking for existing db in %s', db_path) |
|
57 | 57 | if os.path.isfile(db_path): |
|
58 | 58 | self.db_exists = True |
|
59 | log.info('database exist') | |
|
60 | 59 | if not override: |
|
61 | 60 | raise Exception('database already exists') |
|
62 | 61 | |
@@ -65,7 +64,7 b' class DbManage(object):' | |||
|
65 | 64 | Create a auth database |
|
66 | 65 | """ |
|
67 | 66 | self.check_for_db(override) |
|
68 |
if |
|
|
67 | if self.db_exists: | |
|
69 | 68 | log.info("database exist and it's going to be destroyed") |
|
70 | 69 | if self.tests: |
|
71 | 70 | destroy = True |
@@ -79,15 +78,33 b' class DbManage(object):' | |||
|
79 | 78 | meta.Base.metadata.create_all(checkfirst=checkfirst) |
|
80 | 79 | log.info('Created tables for %s', self.dbname) |
|
81 | 80 | |
|
82 | def admin_prompt(self): | |
|
81 | def admin_prompt(self, second=False): | |
|
83 | 82 | if not self.tests: |
|
84 | 83 | import getpass |
|
85 | username = raw_input('Specify admin username:') | |
|
86 | password = getpass.getpass('Specify admin password:') | |
|
84 | ||
|
85 | ||
|
86 | def get_password(): | |
|
87 | password = getpass.getpass('Specify admin password (min 6 chars):') | |
|
87 | 88 | confirm = getpass.getpass('Confirm password:') |
|
89 | ||
|
88 | 90 | if password != confirm: |
|
89 | 91 | log.error('passwords mismatch') |
|
92 | return False | |
|
93 | if len(password) < 6: | |
|
94 | log.error('password is to short use at least 6 characters') | |
|
95 | return False | |
|
96 | ||
|
97 | return password | |
|
98 | ||
|
99 | username = raw_input('Specify admin username:') | |
|
100 | ||
|
101 | password = get_password() | |
|
102 | if not password: | |
|
103 | #second try | |
|
104 | password = get_password() | |
|
105 | if not password: | |
|
90 | 106 | sys.exit() |
|
107 | ||
|
91 | 108 | email = raw_input('Specify admin email:') |
|
92 | 109 | self.create_user(username, password, email, True) |
|
93 | 110 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now