django-orchestra-test/orchestra/contrib/accounts/apps.py
Jorge Pastor 39eea70b79 inicio 2023/07/09
edited 2023/11/24 by pedro
2023-11-24 02:23:54 +01:00

19 lines
672 B
Python

from django.apps import AppConfig
from django.db.models.signals import post_migrate
from django.utils.translation import gettext_lazy as _
from orchestra.core import services, accounts
class AccountConfig(AppConfig):
name = 'orchestra.contrib.accounts'
verbose_name = _("Accounts")
def ready(self):
from .management import create_initial_superuser
from .models import Account
services.register(Account, menu=False, dashboard=False)
accounts.register(Account, icon='Face-monkey.png')
post_migrate.connect(create_initial_superuser,
dispatch_uid="orchestra.contrib.accounts.management.createsuperuser")