.
This commit is contained in:
+3
-3
@@ -148,7 +148,7 @@ class AnatomyQuestionForm(ModelForm):
|
|||||||
"image",
|
"image",
|
||||||
"region",
|
"region",
|
||||||
"modality",
|
"modality",
|
||||||
"Structure2",
|
"structure",
|
||||||
"examination",
|
"examination",
|
||||||
"body_part",
|
"body_part",
|
||||||
"description",
|
"description",
|
||||||
@@ -156,7 +156,7 @@ class AnatomyQuestionForm(ModelForm):
|
|||||||
]
|
]
|
||||||
|
|
||||||
widgets = {
|
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 Structure2Form(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Structure2
|
model = Structure2
|
||||||
fields = ["Structure2"]
|
fields = ["structure"]
|
||||||
|
|
||||||
|
|
||||||
class BodyPartForm(ModelForm):
|
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
|
return self.bodypart
|
||||||
|
|
||||||
|
|
||||||
class Structure(models.Model):
|
#class Structure(models.Model):
|
||||||
structure = models.CharField(max_length=200, primary_key=True)
|
# structure = models.CharField(max_length=200, primary_key=True)
|
||||||
|
#
|
||||||
def __str__(self):
|
# def __str__(self):
|
||||||
return self.structure
|
# return self.structure
|
||||||
|
|
||||||
class Structure2(models.Model):
|
class Structure2(models.Model):
|
||||||
structure = models.CharField(max_length=200, unique=True)
|
structure = models.CharField(max_length=200, unique=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user