This commit is contained in:
Ross
2021-10-25 11:07:39 +01:00
parent aa76d10f43
commit 4c02146c31
3 changed files with 24 additions and 8 deletions
+3 -3
View File
@@ -148,7 +148,7 @@ class AnatomyQuestionForm(ModelForm):
"image",
"region",
"modality",
"Structure2",
"structure",
"examination",
"body_part",
"description",
@@ -156,7 +156,7 @@ class AnatomyQuestionForm(ModelForm):
]
widgets = {
"Structure2" : autocomplete.ModelSelect2(url='anatomy:Structure2-autocomplete')
"structure" : autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
}
@@ -200,7 +200,7 @@ class ExaminationForm(ModelForm):
class Structure2Form(ModelForm):
class Meta:
model = Structure2
fields = ["Structure2"]
fields = ["structure"]
class BodyPartForm(ModelForm):
@@ -0,0 +1,16 @@
# Generated by Django 3.2.8 on 2021-10-25 10:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('anatomy', '0048_auto_20211025_1102'),
]
operations = [
migrations.DeleteModel(
name='Structure',
),
]
+5 -5
View File
@@ -42,11 +42,11 @@ class BodyPart(models.Model):
return self.bodypart
class Structure(models.Model):
structure = models.CharField(max_length=200, primary_key=True)
def __str__(self):
return self.structure
#class Structure(models.Model):
# structure = models.CharField(max_length=200, primary_key=True)
#
# def __str__(self):
# return self.structure
class Structure2(models.Model):
structure = models.CharField(max_length=200, unique=True)