mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
wip
This commit is contained in:
parent
85976cba86
commit
d84f7fbb0e
3 changed files with 27 additions and 7 deletions
|
@ -27,6 +27,12 @@
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<!-- {% include "includes/domain_dates.html" %} -->
|
||||||
|
<div>
|
||||||
|
Expires: {{ expiration_date }}
|
||||||
|
Date created: {{ creation_date }}
|
||||||
|
</div>
|
||||||
|
|
||||||
{% url 'domain-dns-nameservers' pk=domain.id as url %}
|
{% url 'domain-dns-nameservers' pk=domain.id as url %}
|
||||||
{% if domain.nameservers|length > 0 %}
|
{% if domain.nameservers|length > 0 %}
|
||||||
{% include "includes/summary_item.html" with title='DNS name servers' domains='true' value=domain.nameservers list='true' edit_link=url editable=domain.is_editable %}
|
{% include "includes/summary_item.html" with title='DNS name servers' domains='true' value=domain.nameservers list='true' edit_link=url editable=domain.is_editable %}
|
||||||
|
|
5
src/registrar/templates/includes/domain_dates.html
Normal file
5
src/registrar/templates/includes/domain_dates.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Expires: {{ expiration_date }}
|
||||||
|
Date created: {{ creation_date }}
|
||||||
|
</div>
|
|
@ -142,14 +142,23 @@ class DomainView(DomainBaseView):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
|
|
||||||
default_email = self.object.get_default_security_contact().email
|
try:
|
||||||
context["default_security_email"] = default_email
|
default_email = self.object.get_default_security_contact().email
|
||||||
|
context["default_security_email"] = default_email
|
||||||
|
|
||||||
|
security_email = self.object.get_security_email()
|
||||||
|
if security_email is None or security_email == default_email:
|
||||||
|
context["security_email"] = None
|
||||||
|
return context
|
||||||
|
context["security_email"] = security_email
|
||||||
|
|
||||||
|
context["expiration_date"] = self.object.registry_expiration_date
|
||||||
|
context["creation_date"] = self.object.creation_date
|
||||||
|
except:
|
||||||
|
log.warning(err)
|
||||||
|
context["expiration_date"] = datetime.strptime("2019-01-01", "%Y-%m-%d")
|
||||||
|
context["creation_date"] = datetime.strptime("2015-01-01", "%Y-%m-%d")
|
||||||
|
|
||||||
security_email = self.object.get_security_email()
|
|
||||||
if security_email is None or security_email == default_email:
|
|
||||||
context["security_email"] = None
|
|
||||||
return context
|
|
||||||
context["security_email"] = security_email
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def in_editable_state(self, pk):
|
def in_editable_state(self, pk):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue