django-authority/authority/__init__.py
greg 91929a76c9 Features removed in 1.9 :
1. All models need to be defined inside an installed application or declare an explicit app_label. Furthermore, it isn’t possible to import them before their application is loaded. In particular, it isn’t possible to import models inside the root package of an application

2. The django.contrib.contenttypes.generic module is removed

3. django.db.models.loading is removed.
2016-07-27 18:41:25 +02:00

15 lines
337 B
Python

LOADING = False
def autodiscover():
"""
Goes and imports the permissions submodule of every app in INSTALLED_APPS
to make sure the permission set classes are registered correctly.
"""
global LOADING
if LOADING:
return
LOADING = True
from authority import utils
utils.autodiscover_modules()