from django.apps import AppConfig class RidesConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "apps.rides" def ready(self): import apps.rides.choices # noqa: F401 - Register choices import apps.rides.tasks # noqa: F401 - Register Celery tasks from apps.core.state_machine import apply_state_machine from apps.rides.models import Ride # Register FSM transitions for Ride apply_state_machine( Ride, field_name="status", choice_group="statuses", domain="rides" )