summaryrefslogtreecommitdiffstats
path: root/users/apps.py
blob: 86a8eb3ee9c6657049cc430a1eeb369857276b65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.apps import AppConfig
from django.conf import settings


class UsersConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "users"

    def ready(self) -> None:
        if not settings.IN_TESTS:
            # Generate the server actor keypair if needed
            from users.models import SystemActor

            SystemActor.generate_keys_if_needed()