django-orchestra/orchestra/contrib/accounts/apps.py

19 lines
632 B
Python
Raw Normal View History

from django.apps import AppConfig
from django.db.models.signals import post_migrate
from django.utils.translation import ugettext_lazy as _
2015-05-04 14:19:58 +00:00
from orchestra.core import services, accounts
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
services.register(Account, menu=False)
accounts.register(Account)
post_migrate.connect(create_initial_superuser,
dispatch_uid="orchestra.contrib.accounts.management.createsuperuser")