1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 23:29:49 +00:00

improve seafevents related code

This commit is contained in:
lins05
2013-11-09 16:58:57 +08:00
parent 47cf0c6de7
commit 908b600b87
2 changed files with 39 additions and 14 deletions

View File

@@ -356,6 +356,25 @@ LOGIN_ATTEMPT_TIMEOUT = 15 * 60 # in seconds (default: 15 minutes)
SEND_EMAIL_ON_ADDING_SYSTEM_MEMBER = True # Whether to send email when a system staff adding new member.
SEND_EMAIL_ON_RESETTING_USER_PASSWD = True # Whether to send email when a system staff resetting user's password.
##########################
# Settings for seafevents #
##########################
def get_events_conf_file():
if not 'CCNET_CONF_DIR' in os.environ:
return
ccnet_dir = os.environ['CCNET_CONF_DIR']
seafile_ini = os.path.join(ccnet_dir, 'seafile.ini')
if not os.path.exists(seafile_ini):
return
with open(seafile_ini, 'r') as fp:
seafile_data_dir = fp.read().strip()
globals()['EVENTS_CONFIG_FILE'] = os.path.join(seafile_data_dir, 'seafevents.conf')
get_events_conf_file()
##########################
# Settings for Extra App #
##########################