.
This commit is contained in:
+2
-11
@@ -86,15 +86,6 @@ class AnatomyQuestionForm(ModelForm):
|
||||
queryset=Modality.objects.all(),
|
||||
)
|
||||
|
||||
#self.fields["Structure"] = ModelChoiceField(
|
||||
# required=False,
|
||||
# queryset=Structure.objects.all(),
|
||||
#)
|
||||
#self.fields["structure"] = ModelChoiceField(
|
||||
# queryset=Structure.objects.all(),
|
||||
# widget=autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
|
||||
#)
|
||||
|
||||
self.fields["examination"] = ModelChoiceField(
|
||||
required=False,
|
||||
queryset=Examination.objects.all(),
|
||||
@@ -148,7 +139,7 @@ class AnatomyQuestionForm(ModelForm):
|
||||
"image",
|
||||
"region",
|
||||
"modality",
|
||||
"structure",
|
||||
#"structure",
|
||||
"examination",
|
||||
"body_part",
|
||||
"description",
|
||||
@@ -156,7 +147,7 @@ class AnatomyQuestionForm(ModelForm):
|
||||
]
|
||||
|
||||
widgets = {
|
||||
"structure" : autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
|
||||
#"structure" : autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 3.2.8 on 2021-10-25 10:15
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('anatomy', '0051_alter_anatomyquestion_structure'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='anatomyquestion',
|
||||
name='structure',
|
||||
),
|
||||
]
|
||||
+1
-10
@@ -42,13 +42,7 @@ 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 Structure2(models.Model):
|
||||
class Structure(models.Model):
|
||||
structure = models.CharField(max_length=200, unique=True)
|
||||
|
||||
def __str__(self):
|
||||
@@ -118,9 +112,6 @@ class AnatomyQuestion(models.Model):
|
||||
#structure = models.ForeignKey(
|
||||
# Structure, on_delete=models.SET_NULL, null=True, blank=True
|
||||
#)
|
||||
structure = models.CharField(
|
||||
max_length=255, null=True
|
||||
)
|
||||
created_date = models.DateTimeField(default=timezone.now)
|
||||
|
||||
open_access = models.BooleanField(
|
||||
|
||||
Reference in New Issue
Block a user