From 9d331308f647162653fde3937602afde22549ccf Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 7 Dec 2021 15:14:11 +0000 Subject: [PATCH] . --- atlas/forms.py | 2 +- ...ogical_process_case_pathological_process.py | 18 ++++++++++++++++++ atlas/models.py | 4 ++-- .../atlas/pathological_process_detail.html | 12 ++++++------ 4 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 atlas/migrations/0020_rename_pathalogical_process_case_pathological_process.py diff --git a/atlas/forms.py b/atlas/forms.py index 68b7fab7..ac65a0c2 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -230,7 +230,7 @@ class CaseForm(ModelForm): "history", "presentation", "condition", - "pathalogical_process", + "pathological_process", # "sign", "open_access", ] diff --git a/atlas/migrations/0020_rename_pathalogical_process_case_pathological_process.py b/atlas/migrations/0020_rename_pathalogical_process_case_pathological_process.py new file mode 100644 index 00000000..b9d075b6 --- /dev/null +++ b/atlas/migrations/0020_rename_pathalogical_process_case_pathological_process.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.8 on 2021-12-07 15:13 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('atlas', '0019_case_presentation'), + ] + + operations = [ + migrations.RenameField( + model_name='case', + old_name='pathalogical_process', + new_name='pathological_process', + ), + ] diff --git a/atlas/models.py b/atlas/models.py index 1c881951..990117e0 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -170,7 +170,7 @@ class PathalogicalProcess(models.Model): return self.name def get_absolute_url(self): - return reverse("atlas:pathalogical_process_detail", kwargs={"pk": self.pk}) + return reverse("atlas:pathological_process_detail", kwargs={"pk": self.pk}) def get_link(self): return format_html("{}", self.get_absolute_url(), self.name) @@ -230,7 +230,7 @@ class Case(models.Model): presentation = models.ManyToManyField(Presentation, blank=True) - pathalogical_process = models.ManyToManyField(PathalogicalProcess, blank=True) + pathological_process = models.ManyToManyField(PathalogicalProcess, blank=True) differential = models.ManyToManyField( Condition, through=Differential, related_name="casedifferential" diff --git a/atlas/templates/atlas/pathological_process_detail.html b/atlas/templates/atlas/pathological_process_detail.html index bdd9b824..f470f5d3 100755 --- a/atlas/templates/atlas/pathological_process_detail.html +++ b/atlas/templates/atlas/pathological_process_detail.html @@ -5,20 +5,20 @@
-{% comment %} Edit - Delete {% endcomment %} +{% comment %} Edit + Delete {% endcomment %} {% if request.user.is_superuser %} - Admin Edit {% endif %}
-

Name: {{pathalogical_process.name}}

+

Name: {{pathological_process.name}}

- {% if pathalogical_process.case_set.all %} + {% if pathological_process.case_set.all %}

Associated Cases