code: def _get_apphook_field_names(model):
      
      from .models import AppHookConfig  # avoid circular dependencies
      fields = []
      for field in model._meta.fields:
          if isinstance(field, ForeignKey) and issubclass(field.remote_field.model, AppHookConfig):
              fields.append(field)
      return [field.name for field in fields]
docs: Return all foreign key field names for a AppHookConfig based model