django-orchestra-test/orchestra/contrib/accounts/apps.py
Santiago L 70042f3b5c Regenerate commit inicio 2023/07/09
commit 0f26b5a8e0
Author: jorgepastorr <jorge.pastor.rr@gmail.com>
Date:   Sun Jul 9 07:51:51 2023 +0000
Repo:   https://gitea.pangea.org/pangea/django-orchestra.git
2023-11-17 13:25:13 +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")