From d9b98ae66247882b237eeb6a11942ca572a80f66 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Wed, 30 Aug 2023 13:39:14 -0700 Subject: [PATCH 01/53] Change namespace to signed_agreements instead of agreements This is to handle a page for agreement versions - it's a little clearer. --- primed/cdsa/models.py | 6 +++--- primed/cdsa/tests/test_views.py | 22 +++++++++++----------- primed/cdsa/urls.py | 12 ++++++++---- primed/templates/cdsa/nav_items.html | 20 ++++++++++---------- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/primed/cdsa/models.py b/primed/cdsa/models.py index 4605f305..e30bbfd4 100644 --- a/primed/cdsa/models.py +++ b/primed/cdsa/models.py @@ -185,7 +185,7 @@ class MemberAgreement(TimeStampedModel, AgreementTypeModel, models.Model): def get_absolute_url(self): return reverse( - "cdsa:agreements:members:detail", + "cdsa:signed_agreements:members:detail", kwargs={"cc_id": self.signed_agreement.cc_id}, ) @@ -207,7 +207,7 @@ class DataAffiliateAgreement(TimeStampedModel, AgreementTypeModel, models.Model) def get_absolute_url(self): return reverse( - "cdsa:agreements:data_affiliates:detail", + "cdsa:signed_agreements:data_affiliates:detail", kwargs={"cc_id": self.signed_agreement.cc_id}, ) @@ -226,7 +226,7 @@ class NonDataAffiliateAgreement(TimeStampedModel, AgreementTypeModel, models.Mod def get_absolute_url(self): return reverse( - "cdsa:agreements:non_data_affiliates:detail", + "cdsa:signed_agreements:non_data_affiliates:detail", kwargs={"cc_id": self.signed_agreement.cc_id}, ) diff --git a/primed/cdsa/tests/test_views.py b/primed/cdsa/tests/test_views.py index 6d928f06..728a9476 100644 --- a/primed/cdsa/tests/test_views.py +++ b/primed/cdsa/tests/test_views.py @@ -56,7 +56,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:list", args=args) + return reverse("cdsa:signed_agreements:list", args=args) def get_view(self): """Return the view being tested.""" @@ -136,7 +136,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:members:new", args=args) + return reverse("cdsa:signed_agreements:members:new", args=args) def get_view(self): """Return the view being tested.""" @@ -977,7 +977,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:members:detail", args=args) + return reverse("cdsa:signed_agreements:members:detail", args=args) def get_view(self): """Return the view being tested.""" @@ -1061,7 +1061,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:members:list", args=args) + return reverse("cdsa:signed_agreements:members:list", args=args) def get_view(self): """Return the view being tested.""" @@ -1139,7 +1139,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:data_affiliates:new", args=args) + return reverse("cdsa:signed_agreements:data_affiliates:new", args=args) def get_view(self): """Return the view being tested.""" @@ -2125,7 +2125,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:data_affiliates:detail", args=args) + return reverse("cdsa:signed_agreements:data_affiliates:detail", args=args) def get_view(self): """Return the view being tested.""" @@ -2215,7 +2215,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:data_affiliates:list", args=args) + return reverse("cdsa:signed_agreements:data_affiliates:list", args=args) def get_view(self): """Return the view being tested.""" @@ -2293,7 +2293,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:non_data_affiliates:new", args=args) + return reverse("cdsa:signed_agreements:non_data_affiliates:new", args=args) def get_view(self): """Return the view being tested.""" @@ -3118,7 +3118,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:non_data_affiliates:detail", args=args) + return reverse("cdsa:signed_agreements:non_data_affiliates:detail", args=args) def get_view(self): """Return the view being tested.""" @@ -3196,7 +3196,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" - return reverse("cdsa:agreements:non_data_affiliates:list", args=args) + return reverse("cdsa:signed_agreements:non_data_affiliates:list", args=args) def get_view(self): """Return the view being tested.""" @@ -3358,7 +3358,7 @@ def setUp(self): def get_url(self, *args): """Get the url for the view being tested.""" return reverse( - "cdsa:audit:agreements", + "cdsa:audit:signed_agreements", args=args, ) diff --git a/primed/cdsa/urls.py b/primed/cdsa/urls.py index a96e7715..5ef49c82 100644 --- a/primed/cdsa/urls.py +++ b/primed/cdsa/urls.py @@ -37,19 +37,23 @@ "non_data_affiliates", ) -agreement_patterns = ( +signed_agreement_patterns = ( [ path("", views.SignedAgreementList.as_view(), name="list"), path("members/", include(member_agreement_patterns)), path("data_affiliates/", include(data_affiliate_agreement_patterns)), path("non_data_affiliates/", include(non_data_affiliate_agreement_patterns)), ], - "agreements", + "signed_agreements", ) audit_patterns = ( [ - path("agreements/", views.SignedAgreementAudit.as_view(), name="agreements"), + path( + "signed_agreements/", + views.SignedAgreementAudit.as_view(), + name="signed_agreements", + ), path("workspaces/", views.CDSAWorkspaceAudit.as_view(), name="workspaces"), ], "audit", @@ -83,7 +87,7 @@ urlpatterns = [ - path("agreements/", include(agreement_patterns)), + path("signed_agreements/", include(signed_agreement_patterns)), path("records/", include(records_patterns)), path("audit/", include(audit_patterns)), ] diff --git a/primed/templates/cdsa/nav_items.html b/primed/templates/cdsa/nav_items.html index 9587b192..6779cfa0 100644 --- a/primed/templates/cdsa/nav_items.html +++ b/primed/templates/cdsa/nav_items.html @@ -3,39 +3,39 @@ CDSA