111 'default': 'cubicweb', |
111 'default': 'cubicweb', |
112 'help': 'realm to use on HTTP authentication mode', |
112 'help': 'realm to use on HTTP authentication mode', |
113 'group': 'web', 'level': 2, |
113 'group': 'web', 'level': 2, |
114 }), |
114 }), |
115 ('http-session-time', |
115 ('http-session-time', |
116 {'type' : 'int', |
116 {'type' : 'time', |
117 'default': 0, |
117 'default': 0, |
118 'help': "duration in minutes of the cookie used to store session " |
118 'help': "duration of the cookie used to store session identifier. " |
119 "identifier. If 0, the cookie will expire when the user exist its " |
119 "If 0, the cookie will expire when the user exist its browser. " |
120 "browser. Should be 0 or greater than repository\'s session-time.", |
120 "Should be 0 or greater than repository\'s session-time.", |
121 'group': 'web', 'level': 2, |
121 'group': 'web', 'inputlevel': 2, |
122 }), |
122 }), |
123 ('cleanup-session-time', |
123 ('cleanup-session-time', |
124 {'type' : 'int', |
124 {'type' : 'time', |
125 'default': 1440, |
125 'default': '24h', |
126 'help': 'duration of inactivity in minutes after which a connection ' |
126 'help': 'duration of inactivity after which a connection ' |
127 'will be closed, to limit memory consumption (avoid sessions that ' |
127 'will be closed, to limit memory consumption (avoid sessions that ' |
128 'never expire and cause memory leak when http-session-time is 0). ' |
128 'never expire and cause memory leak when http-session-time is 0). ' |
129 'So even if http-session-time is 0 and the user don\'t close his ' |
129 'So even if http-session-time is 0 and the user don\'t close his ' |
130 'browser, he will have to reauthenticate after this time of ' |
130 'browser, he will have to reauthenticate after this time of ' |
131 'inactivity. Default to 24h.', |
131 'inactivity. Default to 24h.', |
132 'group': 'web', 'level': 2, |
132 'group': 'web', 'level': 2, |
133 }), |
133 }), |
134 ('cleanup-anonymous-session-time', |
134 ('cleanup-anonymous-session-time', |
135 {'type' : 'int', |
135 {'type' : 'time', |
136 'default': 5, |
136 'default': '5min', |
137 'help': 'Same as cleanup-session-time but specific to anonymous ' |
137 'help': 'Same as cleanup-session-time but specific to anonymous ' |
138 'sessions. You can have a much smaller timeout here since it will be ' |
138 'sessions. You can have a much smaller timeout here since it will be ' |
139 'transparent to the user. Default to 5min.', |
139 'transparent to the user. Default to 5min.', |
140 'group': 'web', 'level': 2, |
140 'group': 'web', 'level': 2, |
141 }), |
141 }), |
329 val = self.ext_resources[resource] |
329 val = self.ext_resources[resource] |
330 if isinstance(val, str): |
330 if isinstance(val, str): |
331 files = [w.strip() for w in val.split(',') if w.strip()] |
331 files = [w.strip() for w in val.split(',') if w.strip()] |
332 self.ext_resources[resource] = files |
332 self.ext_resources[resource] = files |
333 |
333 |
334 |
|
335 # static files handling ################################################### |
334 # static files handling ################################################### |
336 |
335 |
337 @property |
336 @property |
338 def static_directory(self): |
337 def static_directory(self): |
339 return join(self.appdatahome, 'static') |
338 return join(self.appdatahome, 'static') |