From 86d90742cad41962190a3cb05bfea7b4c296c2ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 00:17:10 +0000 Subject: [PATCH 1/5] Bump actions/dependency-review-action from 1 to 4 Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 1 to 4. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/v1...v4) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependency-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 0e72a00..5fa16e0 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -17,4 +17,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@v3 - name: 'Dependency Review' - uses: actions/dependency-review-action@v1 + uses: actions/dependency-review-action@v4 From 710ae4085e182567c865fc6c4f83142726d91483 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 00:17:13 +0000 Subject: [PATCH 2/5] Bump actions/checkout from 2 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/SonarCloud.yml | 2 +- .github/workflows/dependency-review.yml | 2 +- .github/workflows/django.yml | 2 +- .github/workflows/pylint.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/SonarCloud.yml b/.github/workflows/SonarCloud.yml index 6fbd9a9..aea6510 100644 --- a/.github/workflows/SonarCloud.yml +++ b/.github/workflows/SonarCloud.yml @@ -10,7 +10,7 @@ jobs: name: SonarCloud runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install Dependencies diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 0e72a00..2a47808 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,6 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v1 diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 792cbff..b4abb9a 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -16,7 +16,7 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index f675f17..c0070dd 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -9,7 +9,7 @@ jobs: matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: From 246097f3e6e70dd5f81083763a8753bdf6c29a3b Mon Sep 17 00:00:00 2001 From: pep-un Date: Mon, 13 Jan 2025 11:26:57 +1100 Subject: [PATCH 3/5] Update LICENSE --- LICENSE | 149 ++++++++++++++++++++++++++------------------------------ 1 file changed, 68 insertions(+), 81 deletions(-) diff --git a/LICENSE b/LICENSE index f288702..0ad25db 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,17 +7,15 @@ Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to +our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. +software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. The precise terms and conditions for copying, distribution and modification follow. @@ -72,7 +60,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU General Public License. + "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Use with the GNU Affero General Public License. + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single +under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General +Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published +GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's +versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Affero General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see +For more information on this, and how to apply and follow the GNU AGPL, see . - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. From 2cd49dbc7e9f9e50e255a0832572341b8f25db8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 00:31:42 +0000 Subject: [PATCH 4/5] Bump actions/setup-python from 3 to 5 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v3...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/django.yml | 2 +- .github/workflows/pylint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index b4abb9a..a46f3bb 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install Dependencies diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c0070dd..cda98f0 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install project dependencies From ffcd7777b25dc777532f032c72dadeb34d58db21 Mon Sep 17 00:00:00 2001 From: pep-un Date: Mon, 13 Jan 2025 12:58:51 +1100 Subject: [PATCH 5/5] Delete q it a diff push by mistake on the git repo --- q | 421 -------------------------------------------------------------- 1 file changed, 421 deletions(-) delete mode 100644 q diff --git a/q b/q deleted file mode 100644 index 9b96974..0000000 --- a/q +++ /dev/null @@ -1,421 +0,0 @@ -diff --git a/conformity/admin.py b/conformity/admin.py -index 8196b68..27dad88 100644 ---- a/conformity/admin.py -+++ b/conformity/admin.py -@@ -5,7 +5,7 @@ Customize Django Admin Site to manage my Models instances - from django.contrib import admin - from import_export import resources - from import_export.admin import ImportExportModelAdmin --from .models import Organization, Policy, Measure, Conformity, Audit, Finding, Action, Control, ControlPoint -+from .models import Organization, Framework, Measure, Conformity, Audit, Finding, Action, Control, ControlPoint -  -  - class OrganizationResources(resources.ModelResource): -@@ -17,13 +17,13 @@ class OrganizationAdmin(ImportExportModelAdmin): - ressource_class = Organization -  -  --class PolicyResources(resources.ModelResource): -+class FrameworkResources(resources.ModelResource): - class Meta: -- model = Policy -+ model = Framework -  -  --class PolicyAdmin(ImportExportModelAdmin): -- ressource_class = Policy -+class FrameworkAdmin(ImportExportModelAdmin): -+ ressource_class = Framework -  -  - class MeasureResources(resources.ModelResource): -@@ -55,7 +55,7 @@ class ActionAdmin(ImportExportModelAdmin): -  -  - # Registration --admin.site.register(Policy, PolicyAdmin) -+admin.site.register(Framework, FrameworkAdmin) - admin.site.register(Measure, MeasureAdmin) - admin.site.register(Conformity, ConformityAdmin) - admin.site.register(Action, ActionAdmin) -diff --git a/conformity/migrations/0001_squashed_0014_mesure_is_parent.py b/conformity/migrations/0001_squashed_0014_mesure_is_parent.py -index f7c8759..ea1c41b 100644 ---- a/conformity/migrations/0001_squashed_0014_mesure_is_parent.py -+++ b/conformity/migrations/0001_squashed_0014_mesure_is_parent.py -@@ -47,7 +47,7 @@ class Migration(migrations.Migration): - ('name', models.CharField(max_length=256)), - ('administrative_id', models.CharField(blank=True, max_length=256)), - ('description', models.CharField(blank=True, max_length=256)), -- ('applicable_policies', models.ManyToManyField(blank=True, to='conformity.policy')), -+ ('applicable_frameworks', models.ManyToManyField(blank=True, to='conformity.policy')), - ], - ), - migrations.CreateModel( -diff --git a/conformity/migrations/0001_squashed_0029_alter_action_control_comment_and_more.py b/conformity/migrations/0001_squashed_0029_alter_action_control_comment_and_more.py -index 670c280..efe0eed 100644 ---- a/conformity/migrations/0001_squashed_0029_alter_action_control_comment_and_more.py -+++ b/conformity/migrations/0001_squashed_0029_alter_action_control_comment_and_more.py -@@ -40,7 +40,7 @@ class Migration(migrations.Migration): - ('name', models.CharField(max_length=256, unique=True)), - ('administrative_id', models.CharField(blank=True, max_length=256)), - ('description', models.TextField(blank=True, max_length=4096)), -- ('applicable_policies', models.ManyToManyField(blank=True, to='conformity.policy')), -+ ('applicable_frameworks', models.ManyToManyField(blank=True, to='conformity.policy')), - ], - options={ - 'ordering': ['name'], -diff --git a/conformity/migrations/0041_rename_policy_framework_alter_framework_options_and_more.py b/conformity/migrations/0041_rename_policy_framework_alter_framework_options_and_more.py -index 03d4015..067c37d 100644 ---- a/conformity/migrations/0041_rename_policy_framework_alter_framework_options_and_more.py -+++ b/conformity/migrations/0041_rename_policy_framework_alter_framework_options_and_more.py -@@ -23,4 +23,9 @@ class Migration(migrations.Migration): - old_name='policy', - new_name='framework', - ), -+ migrations.RenameField( -+ model_name='organization', -+ old_name='applicable_policies', -+ new_name='applicable_frameworks', -+ ), - ] -diff --git a/conformity/models.py b/conformity/models.py -index e255c84..7de3cb4 100644 ---- a/conformity/models.py -+++ b/conformity/models.py -@@ -1,6 +1,6 @@ - """ - Conformity module manage all the manual declarative aspect of conformity management. --It's Organized around Organization, Policy, Measure and Conformity classes. -+It's Organized around Organization, Framework, Measure and Conformity classes. - """ - from calendar import monthrange - from statistics import mean -@@ -20,19 +20,19 @@ from auditlog.context import set_actor - User = get_user_model() -  -  --class PolicyManager(models.Manager): -+class FrameworkManager(models.Manager): - def get_by_natural_key(self, name): - return self.get(name=name) -  -  --class Policy(models.Model): -+class Framework(models.Model): - """ -- Policy class represent the conformity policy you will apply on Organization. -- A Policy is simply a collections of Measure with publication parameter. -+ Framework class represent the conformity framework you will apply on Organization. -+ A Framework is simply a collections of Measure with publication parameter. - """ -  - class Type(models.TextChoices): -- """ List of the Type of policy """ -+ """ List of the Type of framework """ - INTERNATIONAL = 'INT', _('International Standard') - NATIONAL = 'NAT', _('National Standard') - TECHNICAL = 'TECH', _('Technical Standard') -@@ -40,7 +40,7 @@ class Policy(models.Model): - POLICY = 'POL', _('Internal Policy') - OTHER = 'OTHER', _('Other') -  -- objects = PolicyManager() -+ objects = FrameworkManager() - name = models.CharField(max_length=256, unique=True) - version = models.IntegerField(default=0) - publish_by = models.CharField(max_length=256) -@@ -62,35 +62,35 @@ class Policy(models.Model): - return (self.name) -  - def get_type(self): -- """return the readable version of the Policy Type""" -+ """return the readable version of the Framework Type""" - return self.Type(self.type).label -  - def get_measures(self): -- """return all Measure related to the Policy""" -- return Measure.objects.filter(policy=self.id) -+ """return all Measure related to the Framework""" -+ return Measure.objects.filter(framework=self.id) -  - def get_measures_number(self): -- """return the number of leaf Measure related to the Policy""" -- return Measure.objects.filter(policy=self.id).filter(measure__is_parent=False).count() -+ """return the number of leaf Measure related to the Framework""" -+ return Measure.objects.filter(framework=self.id).filter(measure__is_parent=False).count() -  - def get_root_measure(self): -- """return the root Measure of the Policy""" -- return Measure.objects.filter(policy=self.id).filter(level=0).order_by('order') -+ """return the root Measure of the Framework""" -+ return Measure.objects.filter(framework=self.id).filter(level=0).order_by('order') -  - def get_first_measures(self): -- """return the Measure of the first hierarchical level of the Policy""" -- return Measure.objects.filter(policy=self.id).filter(level=1).order_by('order') -+ """return the Measure of the first hierarchical level of the Framework""" -+ return Measure.objects.filter(framework=self.id).filter(level=1).order_by('order') -  -  - class Organization(models.Model): - """ - Organization class is a representation of a company, a division of company, an administration... -- The Organization may answer to one or several Policy. -+ The Organization may answer to one or several Framework. - """ - name = models.CharField(max_length=256, unique=True) - administrative_id = models.CharField(max_length=256, blank=True) - description = models.TextField(max_length=4096, blank=True) -- applicable_policies = models.ManyToManyField(Policy, blank=True) -+ applicable_frameworks = models.ManyToManyField(Framework, blank=True) -  - class Meta: - ordering = ['name'] -@@ -106,21 +106,21 @@ class Organization(models.Model): - """return the absolute URL for Forms, could probably do better""" - return reverse('conformity:organization_index') -  -- def get_policies(self): -- """return all Policy applicable to the Organization""" -- return self.applicable_policies.all() -+ def get_frameworks(self): -+ """return all Framework applicable to the Organization""" -+ return self.applicable_frameworks.all() -  - def remove_conformity(self, pid): - """Cascade deletion of conformity""" - with set_actor('system'): -- measure_set = Measure.objects.filter(policy=pid) -+ measure_set = Measure.objects.filter(framework=pid) - for measure in measure_set: - Conformity.objects.filter(measure=measure.id).filter(organization=self.id).delete() -  - def add_conformity(self, pid): - """Automatic creation of conformity""" - with set_actor('system'): -- measure_set = Measure.objects.filter(policy=pid) -+ measure_set = Measure.objects.filter(framework=pid) - for measure in measure_set: - conformity = Conformity(organization=self, measure=measure) - conformity.save() -@@ -134,7 +134,7 @@ class MeasureManager(models.Manager): - class Measure(models.Model): - """ - A Measure is a precise requirement. -- Measure can be hierarchical in order to form a collection of Measure, aka Policy. -+ Measure can be hierarchical in order to form a collection of Measure, aka Framework. - A Measure is not representing the conformity level, see Conformity class. - """ - objects = MeasureManager() -@@ -142,7 +142,7 @@ class Measure(models.Model): - name = models.CharField(max_length=50, blank=True, unique=True) - level = models.IntegerField(default=0) - order = models.IntegerField(default=1) -- policy = models.ForeignKey(Policy, on_delete=models.CASCADE) -+ framework = models.ForeignKey(Framework, on_delete=models.CASCADE) - parent = models.ForeignKey('self', on_delete=models.SET_NULL, null=True, blank=True) - title = models.CharField(max_length=256, blank=True) - description = models.TextField(blank=True) -@@ -157,7 +157,7 @@ class Measure(models.Model): - def natural_key(self): - return (self.name) -  -- natural_key.dependencies = ['conformity.policy'] -+ natural_key.dependencies = ['conformity.framework'] -  - def get_children(self): - """Return all children of the measure""" -@@ -188,12 +188,12 @@ class Conformity(models.Model): - def natural_key(self): - return self.organization, self.measure -  -- natural_key.dependencies = ['conformity.policy', 'conformity.measure', 'conformity.organization'] -+ natural_key.dependencies = ['conformity.framework', 'conformity.measure', 'conformity.organization'] -  - def get_absolute_url(self): - """Return the absolute URL of the class for Form, probably not the best way to do it""" - return reverse('conformity:conformity_orgpol_index', -- kwargs={'org': self.organization.id, 'pol': self.measure.policy.id}) -+ kwargs={'org': self.organization.id, 'pol': self.measure.framework.id}) -  - def get_children(self): - """Return all children Conformity based on Measure hierarchy""" -@@ -259,8 +259,8 @@ def post_init_callback(instance, **kwargs): - instance.name = instance.code -  -  --@receiver(m2m_changed, sender=Organization.applicable_policies.through) --def change_policy(instance, action, pk_set, *args, **kwargs): -+@receiver(m2m_changed, sender=Organization.applicable_frameworks.through) -+def change_framework(instance, action, pk_set, *args, **kwargs): - if action == "post_add": - for pk in pk_set: - instance.add_conformity(pk) -@@ -288,7 +288,7 @@ class Audit(models.Model): - description = models.TextField(max_length=4096, blank=True) - conclusion = models.TextField(max_length=4096, blank=True) - auditor = models.CharField(max_length=256) -- audited_policies = models.ManyToManyField(Policy, blank=True) -+ audited_policies = models.ManyToManyField(Framework, blank=True) - start_date = models.DateField(null=True, blank=True) - end_date = models.DateField(null=True, blank=True) - report_date = models.DateField(null=True, blank=True) -@@ -320,7 +320,7 @@ class Audit(models.Model): - return reverse('conformity:audit_index') -  - def get_policies(self): -- """return all Policy within the Audit scope""" -+ """return all Framework within the Audit scope""" - return self.audited_policies.all() -  - def get_type(self): -diff --git a/conformity/templates/conformity/audit_detail.html b/conformity/templates/conformity/audit_detail.html -index 5d1bd8c..ba97035 100644 ---- a/conformity/templates/conformity/audit_detail.html -+++ b/conformity/templates/conformity/audit_detail.html -@@ -9,7 +9,7 @@ -

{{ audit.get_type }} realized by {{ audit.auditor }} from {{ audit.start_date }} to {{ audit.end_date }}.

 -

The following policies were within the audit scope :

 -