kpsul/gestion/apps.py

18 lines
506 B
Python
Raw Normal View History

2017-02-22 20:00:32 +01:00
from django.apps import AppConfig
class GestionConfig(AppConfig):
name = "gestion"
verbose_name = "Gestion des outils communs COF/BDS"
2017-09-09 15:55:22 +02:00
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
2017-09-09 15:55:22 +02:00
assoc_getter().setup_perms(buro_of_apps=buro_of_apps, perms=perms)