From 519f1a014f608909eaba3be191fd8a49f4c4d2e2 Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 30 Nov 2021 22:56:12 +0000 Subject: [PATCH] . --- .../0013_rename_structure_structure_name.py | 18 ++++++++++++++++++ atlas/models.py | 2 +- atlas/urls.py | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 atlas/migrations/0013_rename_structure_structure_name.py diff --git a/atlas/migrations/0013_rename_structure_structure_name.py b/atlas/migrations/0013_rename_structure_structure_name.py new file mode 100644 index 00000000..7f61548d --- /dev/null +++ b/atlas/migrations/0013_rename_structure_structure_name.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.8 on 2021-11-30 22:55 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('atlas', '0012_auto_20211130_2050'), + ] + + operations = [ + migrations.RenameField( + model_name='structure', + old_name='structure', + new_name='name', + ), + ] diff --git a/atlas/models.py b/atlas/models.py index 8474c6e6..6f9e2020 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -122,7 +122,7 @@ class Differential(models.Model): class Structure(SynMixin, models.Model): - structure = models.CharField(max_length=255, unique=True) + name = models.CharField(max_length=255, unique=True) synonym = models.ManyToManyField("self", blank=True) diff --git a/atlas/urls.py b/atlas/urls.py index e97a373a..d48197f5 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -90,12 +90,12 @@ urlpatterns = [ ), path( "finding-autocomplete", - views.ConditionAutocomplete.as_view(model=Finding, create_field='finding'), + views.FindingAutocomplete.as_view(model=Finding, create_field='finding'), name="finding-autocomplete", ), path( "structure-autocomplete", - views.ConditionAutocomplete.as_view(model=Structure, create_field='structure'), + views.StructureAutocomplete.as_view(model=Structure, create_field='structure'), name="structure-autocomplete", ),