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