requesting entity working - code still wip

This commit is contained in:
David Kennedy 2025-01-16 14:13:51 -05:00
parent 74ef30b52d
commit 6a49f9e373
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 163 additions and 70 deletions

View file

@ -368,7 +368,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
and from the database if `use_db` is True (provided that record exists).
An empty form will be provided if neither of those are true.
"""
logger.debug(f"get_forms({step},{use_post},{use_db},{files})")
kwargs = {
"files": files,
"prefix": self.steps.current,
@ -385,6 +385,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
for form in forms:
data = form.from_database(self.domain_request) if self.has_pk() else None
logger.debug(data)
if use_post:
instantiated.append(form(self.request.POST, **kwargs))
elif use_db:
@ -562,6 +563,13 @@ class RequestingEntity(DomainRequestWizard):
template_name = "domain_request_requesting_entity.html"
forms = [forms.RequestingEntityYesNoForm, forms.RequestingEntityForm]
#for debugging:
def get(self, request, *args, **kwargs):
"""This method handles GET requests."""
logger.debug("in get")
return super().get(request, *args, **kwargs)
def save(self, forms: list):
"""Override of save to clear or associate certain suborganization data
depending on what the user wishes to do. For instance, we want to add a suborganization