2022-11-05 13:17:27 -07:00
|
|
|
from django.apps import AppConfig
|
2022-11-20 22:07:57 -08:00
|
|
|
from django.conf import settings
|
2022-11-05 13:17:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
class UsersConfig(AppConfig):
|
|
|
|
default_auto_field = "django.db.models.BigAutoField"
|
|
|
|
name = "users"
|
2022-11-20 17:29:19 -08:00
|
|
|
|
|
|
|
def ready(self) -> None:
|
2022-11-20 22:07:57 -08:00
|
|
|
if not settings.IN_TESTS:
|
|
|
|
# Generate the server actor keypair if needed
|
|
|
|
from users.models import SystemActor
|
2022-11-20 17:29:19 -08:00
|
|
|
|
2022-11-20 22:07:57 -08:00
|
|
|
SystemActor.generate_keys_if_needed()
|