.
This commit is contained in:
+3
-3
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user