This commit is contained in:
Ross
2021-10-25 11:18:04 +01:00
parent 7ec972b73c
commit 489b80ed53
3 changed files with 24 additions and 5 deletions
+2 -2
View File
@@ -139,7 +139,7 @@ class AnatomyQuestionForm(ModelForm):
"image",
"region",
"modality",
#"structure",
"structure",
"examination",
"body_part",
"description",
@@ -147,7 +147,7 @@ class AnatomyQuestionForm(ModelForm):
]
widgets = {
#"structure" : autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
"structure" : autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
}
@@ -0,0 +1,19 @@
# Generated by Django 3.2.8 on 2021-10-25 10:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('anatomy', '0052_remove_anatomyquestion_structure'),
]
operations = [
migrations.AddField(
model_name='anatomyquestion',
name='structure',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='anatomy.structure'),
),
]
+3 -3
View File
@@ -109,9 +109,9 @@ class AnatomyQuestion(models.Model):
body_part = models.ForeignKey(
BodyPart, on_delete=models.SET_NULL, null=True, blank=True
)
#structure = models.ForeignKey(
# Structure, on_delete=models.SET_NULL, null=True, blank=True
#)
structure = models.ForeignKey(
Structure, on_delete=models.SET_NULL, null=True, blank=True
)
created_date = models.DateTimeField(default=timezone.now)
open_access = models.BooleanField(