✅ Purpose
Represents a target domain and the SFTP credentials used to deploy landings.
🧩 Fields
domain— unique domain string, validated byDomainValidator(regex in settings)sftp_host— IP address only (HostValidator)sftp_port— default 22sftp_username/sftp_password— SFTP credentialsnotes— optional, up to 300 charsowner— FK to Usercreated_at,updated_at
🧠 Properties & methods
root_directory→/home/<sftp_username>/public_htmldir_exists(dir_path)→ checks if<root_directory>/<dir_path>exists on SFTP- SFTP host key checking is disabled (CnOpts.hostkeys = None)
🔗 Relations
Landing.domains— Many‑to‑ManyDeployment.domain— FKLandingTransferLog.new_domain— FK
⚠️ Notes
SFTP password is stored directly in the DB (no encryption at model level).