django-orchestra/orchestra/apps/resources/apps.py

16 lines
427 B
Python

from django.apps import AppConfig
from orchestra.utils import database_ready
class ResourcesConfig(AppConfig):
name = 'orchestra.apps.resources'
verbose_name = 'Resources'
def ready(self):
if database_ready():
from .admin import insert_resource_inlines
from .models import create_resource_relation
create_resource_relation()
insert_resource_inlines()