MCPcopy Create free account
hub / github.com/hunvreus/devpush / ProjectDomainVerifyForm

Class ProjectDomainVerifyForm

app/forms/project.py:387–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385
386
387class ProjectDomainVerifyForm(StarletteForm):
388 domain_id = HiddenField(validators=[DataRequired()])
389
390 def __init__(self, *args, domains: list[Domain], **kwargs):
391 super().__init__(*args, **kwargs)
392 self.domains = domains
393
394 def validate_domain_id(self, field):
395 domain = next(
396 (domain for domain in self.domains if domain.id == int(field.data)), None
397 )
398 if not domain:
399 raise ValidationError(_("Domain not found."))
400 if domain.status == "active":
401 raise ValidationError(_("Domain is already verified."))
402
403
404class ProjectBuildAndDeployForm(StarletteForm):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected