Show More
@@ -47,26 +47,27 b' cache_dir = %(here)s/data' | |||
|
47 | 47 | #################################### |
|
48 | 48 | ### BEAKER CACHE #### |
|
49 | 49 | #################################### |
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
50 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
51 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
52 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
|
55 | 53 | |
|
56 |
|
|
|
57 |
|
|
|
54 | beaker.cache.super_short_term.type=memory | |
|
55 | beaker.cache.super_short_term.expire=10 | |
|
56 | ||
|
57 | beaker.cache.short_term.type=memory | |
|
58 | beaker.cache.short_term.expire=60 | |
|
58 | 59 | |
|
59 |
|
|
|
60 |
|
|
|
61 | ||
|
62 |
|
|
|
63 |
|
|
|
64 | ||
|
65 |
|
|
|
66 |
|
|
|
67 | ||
|
68 |
|
|
|
69 |
|
|
|
60 | beaker.cache.long_term.type=memory | |
|
61 | beaker.cache.long_term.expire=36000 | |
|
62 | ||
|
63 | beaker.cache.sql_cache_short.type=memory | |
|
64 | beaker.cache.sql_cache_short.expire=5 | |
|
65 | ||
|
66 | beaker.cache.sql_cache_med.type=memory | |
|
67 | beaker.cache.sql_cache_med.expire=360 | |
|
68 | ||
|
69 | beaker.cache.sql_cache_long.type=file | |
|
70 | beaker.cache.sql_cache_long.expire=3600 | |
|
70 | 71 | |
|
71 | 72 | #################################### |
|
72 | 73 | ### BEAKER SESSION #### |
@@ -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 |
@@ -47,26 +47,27 b' cache_dir = %(here)s/data' | |||
|
47 | 47 | #################################### |
|
48 | 48 | ### BEAKER CACHE #### |
|
49 | 49 | #################################### |
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 | beaker.cache.long_term.type=memory | |
|
54 | beaker.cache.long_term.expire=36000 | |
|
50 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
51 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
52 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
|
55 | 53 | |
|
56 |
|
|
|
57 |
|
|
|
54 | beaker.cache.super_short_term.type=memory | |
|
55 | beaker.cache.super_short_term.expire=10 | |
|
56 | ||
|
57 | beaker.cache.short_term.type=memory | |
|
58 | beaker.cache.short_term.expire=60 | |
|
58 | 59 | |
|
59 |
|
|
|
60 |
|
|
|
61 | ||
|
62 |
|
|
|
63 |
|
|
|
64 | ||
|
65 |
|
|
|
66 |
|
|
|
67 | ||
|
68 |
|
|
|
69 |
|
|
|
60 | beaker.cache.long_term.type=memory | |
|
61 | beaker.cache.long_term.expire=36000 | |
|
62 | ||
|
63 | beaker.cache.sql_cache_short.type=memory | |
|
64 | beaker.cache.sql_cache_short.expire=5 | |
|
65 | ||
|
66 | beaker.cache.sql_cache_med.type=memory | |
|
67 | beaker.cache.sql_cache_med.expire=360 | |
|
68 | ||
|
69 | beaker.cache.sql_cache_long.type=file | |
|
70 | beaker.cache.sql_cache_long.expire=3600 | |
|
70 | 71 | |
|
71 | 72 | #################################### |
|
72 | 73 | ### BEAKER SESSION #### |
@@ -48,26 +48,27 b' app_instance_uuid = ${app_instance_uuid}' | |||
|
48 | 48 | #################################### |
|
49 | 49 | ### BEAKER CACHE #### |
|
50 | 50 | #################################### |
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 | beaker.cache.long_term.type=memory | |
|
55 | beaker.cache.long_term.expire=36000 | |
|
51 | beaker.cache.data_dir=/%(here)s/data/cache/data | |
|
52 | beaker.cache.lock_dir=/%(here)s/data/cache/lock | |
|
53 | beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long | |
|
56 | 54 | |
|
57 |
|
|
|
58 |
|
|
|
55 | beaker.cache.super_short_term.type=memory | |
|
56 | beaker.cache.super_short_term.expire=10 | |
|
57 | ||
|
58 | beaker.cache.short_term.type=memory | |
|
59 | beaker.cache.short_term.expire=60 | |
|
59 | 60 | |
|
60 |
|
|
|
61 |
|
|
|
62 | ||
|
63 |
|
|
|
64 |
|
|
|
65 | ||
|
66 |
|
|
|
67 |
|
|
|
68 | ||
|
69 |
|
|
|
70 |
|
|
|
61 | beaker.cache.long_term.type=memory | |
|
62 | beaker.cache.long_term.expire=36000 | |
|
63 | ||
|
64 | beaker.cache.sql_cache_short.type=memory | |
|
65 | beaker.cache.sql_cache_short.expire=5 | |
|
66 | ||
|
67 | beaker.cache.sql_cache_med.type=memory | |
|
68 | beaker.cache.sql_cache_med.expire=360 | |
|
69 | ||
|
70 | beaker.cache.sql_cache_long.type=file | |
|
71 | beaker.cache.sql_cache_long.expire=3600 | |
|
71 | 72 | |
|
72 | 73 | #################################### |
|
73 | 74 | ### BEAKER SESSION #### |
@@ -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 |
|
84 | ||
|
85 | ||
|
86 | def get_password(): | |
|
87 | password = getpass.getpass('Specify admin password (min 6 chars):') | |
|
88 | confirm = getpass.getpass('Confirm password:') | |
|
89 | ||
|
90 | if password != confirm: | |
|
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 | ||
|
85 | 99 | username = raw_input('Specify admin username:') |
|
86 | password = getpass.getpass('Specify admin password:') | |
|
87 | confirm = getpass.getpass('Confirm password:') | |
|
88 |
if password |
|
|
89 | log.error('passwords mismatch') | |
|
90 |
|
|
|
100 | ||
|
101 | password = get_password() | |
|
102 | if not password: | |
|
103 | #second try | |
|
104 | password = get_password() | |
|
105 | if not password: | |
|
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