def load():
# Dynamically grab package name
package_name = os.path.dirname(__file__)
# For each registered app, import all of the available roles
for app in settings.INSTALLED_APPS:
# Make sure the app is not self
if app is not package_name:
try:
import_module('.roles', app)
except ImportError:
pass
# Registers a Role with the global Bootstrapper if it is not already registered.
# Returns the True if Role is added, None if it already exists
评论列表
文章目录