kpsul/gestion/apps.py
2017-09-09 15:55:22 +02:00

18 lines
506 B
Python

from django.apps import AppConfig
class GestionConfig(AppConfig):
name = "gestion"
verbose_name = "Gestion des outils communs COF/BDS"
def setup_assoc_perms(apps, assoc_getter, buro_of_apps=[], perms=[]):
try:
# Association and Permission models are required to be ready to setup
# perms.
apps.get_app_config('gestion')
apps.get_app_config('auth')
except LookupError:
return
assoc_getter().setup_perms(buro_of_apps=buro_of_apps, perms=perms)