mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 19:05:16 +00:00
add org_created_callback (#7746)
This commit is contained in:
parent
de09b014a0
commit
cb05c2390e
@ -0,0 +1,16 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
from seahub.organizations.signals import org_created
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
conf_dir = os.environ['SEAFILE_CENTRAL_CONF_DIR']
|
||||||
|
sys.path.append(conf_dir)
|
||||||
|
try:
|
||||||
|
from seahub_custom_functions import org_created_callback
|
||||||
|
org_created.connect(org_created_callback)
|
||||||
|
except ImportError as e:
|
||||||
|
logger.debug(e)
|
||||||
|
except KeyError as e:
|
||||||
|
logger.debug(e)
|
Loading…
Reference in New Issue
Block a user