2015-05-01 18:05:34 +00:00
|
|
|
from django.apps import AppConfig
|
|
|
|
from django.db.models.signals import post_migrate
|
2023-11-17 12:25:13 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2015-05-01 18:05:34 +00:00
|
|
|
|
2015-05-04 14:19:58 +00:00
|
|
|
from orchestra.core import services, accounts
|
2015-05-01 18:05:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AccountConfig(AppConfig):
|
|
|
|
name = 'orchestra.contrib.accounts'
|
|
|
|
verbose_name = _("Accounts")
|
|
|
|
|
|
|
|
def ready(self):
|
2015-05-04 14:19:58 +00:00
|
|
|
from .management import create_initial_superuser
|
|
|
|
from .models import Account
|
2015-05-07 14:09:37 +00:00
|
|
|
services.register(Account, menu=False, dashboard=False)
|
|
|
|
accounts.register(Account, icon='Face-monkey.png')
|
2015-05-01 18:05:34 +00:00
|
|
|
post_migrate.connect(create_initial_superuser,
|
|
|
|
dispatch_uid="orchestra.contrib.accounts.management.createsuperuser")
|