fixed nameservers path

This commit is contained in:
David Kennedy 2023-10-03 16:56:12 -04:00
parent 84cc92cb0a
commit 7c8f5e77f1
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 9 additions and 9 deletions

View file

@ -27,7 +27,7 @@
</div>
<br>
{% url 'domain-nameservers' pk=domain.id as url %}
{% url 'domain-dns-nameservers' pk=domain.id as url %}
{% if domain.nameservers|length > 0 %}
{% include "includes/summary_item.html" with title='DNS name servers' value=domain.nameservers list='true' edit_link=url %}
{% else %}

View file

@ -11,7 +11,7 @@
<p>You can enter your name services, as well as other DNS-related information, in the following sections:</p>
{% url 'domain-nameservers' pk=domain.id as url %}
{% url 'domain-dns-nameservers' pk=domain.id as url %}
<p><a href="{{ url }}">DNS name servers</a></p>
{% url 'domain-subdomains' pk=domain.id as url %}

View file

@ -1098,7 +1098,7 @@ class TestDomainPermissions(TestWithDomainPermissions):
"domain",
"domain-users",
"domain-users-add",
"domain-nameservers",
"domain-dns-nameservers",
"domain-org-name-address",
"domain-authorizing-official",
"domain-your-contact-information",
@ -1119,7 +1119,7 @@ class TestDomainPermissions(TestWithDomainPermissions):
"domain",
"domain-users",
"domain-users-add",
"domain-nameservers",
"domain-dns-nameservers",
"domain-org-name-address",
"domain-authorizing-official",
"domain-your-contact-information",
@ -1308,7 +1308,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
def test_domain_nameservers(self):
"""Can load domain's nameservers page."""
page = self.client.get(
reverse("domain-nameservers", kwargs={"pk": self.domain.id})
reverse("domain-dns-nameservers", kwargs={"pk": self.domain.id})
)
self.assertContains(page, "Domain name servers")
@ -1319,7 +1319,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
Uses self.app WebTest because we need to interact with forms.
"""
nameservers_page = self.app.get(
reverse("domain-nameservers", kwargs={"pk": self.domain.id})
reverse("domain-dns-nameservers", kwargs={"pk": self.domain.id})
)
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
@ -1329,7 +1329,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
self.assertEqual(result.status_code, 302)
self.assertEqual(
result["Location"],
reverse("domain-nameservers", kwargs={"pk": self.domain.id}),
reverse("domain-dns-nameservers", kwargs={"pk": self.domain.id}),
)
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
page = result.follow()
@ -1342,7 +1342,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
Uses self.app WebTest because we need to interact with forms.
"""
nameservers_page = self.app.get(
reverse("domain-nameservers", kwargs={"pk": self.domain.id})
reverse("domain-dns-nameservers", kwargs={"pk": self.domain.id})
)
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)

View file

@ -172,7 +172,7 @@ class DomainNameserversView(DomainPermissionView, FormMixin):
def get_success_url(self):
"""Redirect to the nameservers page for the domain."""
return reverse("domain-nameservers", kwargs={"pk": self.object.pk})
return reverse("domain-dns-nameservers", kwargs={"pk": self.object.pk})
def get_context_data(self, **kwargs):
"""Adjust context from FormMixin for formsets."""