From 2407cba4e4c6f5efcb74b97e28e6486998e9e2b8 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 22 Oct 2021 20:38:33 +0100 Subject: [PATCH] . --- anatomy/migrations/0047_auto_20211022_2038.py | 28 +++++++++++++++++++ anatomy/models.py | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 anatomy/migrations/0047_auto_20211022_2038.py diff --git a/anatomy/migrations/0047_auto_20211022_2038.py b/anatomy/migrations/0047_auto_20211022_2038.py new file mode 100644 index 00000000..f20a4a9a --- /dev/null +++ b/anatomy/migrations/0047_auto_20211022_2038.py @@ -0,0 +1,28 @@ +# Generated by Django 3.2.8 on 2021-10-22 19:38 + +import anatomy.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('anatomy', '0046_alter_exam_open_access'), + ] + + operations = [ + migrations.RemoveField( + model_name='structure', + name='id', + ), + migrations.AlterField( + model_name='anatomyquestion', + name='image', + field=models.ImageField(help_text="The image to use for the question. Ideally use use unmarked images and annotate (arrow) them on the test system. If you wish to reuse an image that is already uploaded 'clone' the question that contains it.As a preference", upload_to=anatomy.models.image_directory_path), + ), + migrations.AlterField( + model_name='structure', + name='structure', + field=models.CharField(max_length=200, primary_key=True, serialize=False), + ), + ] diff --git a/anatomy/models.py b/anatomy/models.py index 2951ba2d..3a4bed13 100644 --- a/anatomy/models.py +++ b/anatomy/models.py @@ -43,7 +43,7 @@ class BodyPart(models.Model): class Structure(models.Model): - structure = models.CharField(max_length=200) + structure = models.CharField(max_length=200, primary_key=True) def __str__(self): return self.structure