Source: apps/search_console_tools/models.py.

🎯 Purpose

DomainAccountMapping maps a root domain to an account. Used by the API when the client does not provide account_email.

βœ… Validation

clean() performs:

  • normalization (trim + lowercase)
  • domain format validation
  • β€œroot domain only” enforcement (no subdomains)

πŸ”„ Automatic updates

After a successful get_account_domains completion:

  • signal update_domain_account_mappings parses CommandRequest.result
  • creates/updates DomainAccountMapping for each returned domain