.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 3.1.3 on 2021-01-20 22:06
|
||||
|
||||
import anatomy.models
|
||||
import django.core.files.storage
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('anatomy', '0020_auto_20210118_1402'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='anatomyquestion',
|
||||
name='image',
|
||||
field=models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='http://penracourses.org.uk//media/anatomy/', location='/home/ross/scripts/sites/rad/media//anatomy/'), upload_to=anatomy.models.image_directory_path),
|
||||
),
|
||||
]
|
||||
+14
-14
@@ -47,7 +47,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'debug_toolbar',
|
||||
#"tagulous",
|
||||
"tagulous",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -121,12 +121,12 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
},
|
||||
]
|
||||
|
||||
#SERIALIZATION_MODULES = {
|
||||
# "xml": "tagulous.serializers.xml_serializer",
|
||||
# "json": "tagulous.serializers.json",
|
||||
# "python": "tagulous.serializers.python",
|
||||
# "yaml": "tagulous.serializers.pyyaml",
|
||||
#}
|
||||
SERIALIZATION_MODULES = {
|
||||
"xml": "tagulous.serializers.xml_serializer",
|
||||
"json": "tagulous.serializers.json",
|
||||
"python": "tagulous.serializers.python",
|
||||
"yaml": "tagulous.serializers.pyyaml",
|
||||
}
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
||||
@@ -161,14 +161,14 @@ if DEBUG:
|
||||
# Redirect to home URL after login (Default redirects to /accounts/profile/)
|
||||
LOGIN_REDIRECT_URL = "/"
|
||||
|
||||
#TAGULOUS_AUTOCOMPLETE_JS = (
|
||||
#"tagulous/lib/jquery.js",
|
||||
#"tagulous/lib/select2-3/select2.min.js",
|
||||
#"tagulous/tagulous.js",
|
||||
#"tagulous/adaptor/select2-3.js",
|
||||
#)
|
||||
TAGULOUS_AUTOCOMPLETE_JS = (
|
||||
"tagulous/lib/jquery.js",
|
||||
"tagulous/lib/select2-3/select2.min.js",
|
||||
"tagulous/tagulous.js",
|
||||
"tagulous/adaptor/select2-3.js",
|
||||
)
|
||||
|
||||
#TAGULOUS_AUTOCOMPLETE_CSS = {"all": ["tagulous/lib/select2-3/select2.css"]}
|
||||
TAGULOUS_AUTOCOMPLETE_CSS = {"all": ["tagulous/lib/select2-3/select2.css"]}
|
||||
|
||||
INTERNAL_IPS = ["localhost", "127.0.0.1"]
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
from django.contrib import admin
|
||||
from .models import Rapid, RapidImage, Examination, Site, Abnormality, Region, Note, RapidCreationDefault, Answer, Exam
|
||||
|
||||
#import tagulous.admin
|
||||
import tagulous.admin
|
||||
|
||||
from django.forms import ModelForm
|
||||
|
||||
@@ -41,7 +41,7 @@ class RapidAdminForm(ModelForm):
|
||||
|
||||
fields = [
|
||||
"normal", "abnormality", "region", "laterality", "examination",
|
||||
"site", "feedback", "author"
|
||||
"site", "sign", "condition", "feedback", "author"
|
||||
]
|
||||
|
||||
widgets = {
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Generated by Django 3.1.3 on 2021-01-20 22:06
|
||||
|
||||
import django.core.files.storage
|
||||
from django.db import migrations, models
|
||||
import rapids.models
|
||||
import tagulous.models.fields
|
||||
import tagulous.models.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rapids', '0002_auto_20210118_1402'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='rapid',
|
||||
name='site',
|
||||
field=models.ManyToManyField(blank=True, default=1, help_text='If we know the source of the image', to='rapids.Site'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='rapidimage',
|
||||
name='image',
|
||||
field=models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='http://penracourses.org.uk//media/rapids/', location='/home/ross/scripts/sites/rad/media//rapids/'), upload_to=rapids.models.image_directory_path),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Sign',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
('slug', models.SlugField()),
|
||||
('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
|
||||
('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
'abstract': False,
|
||||
'unique_together': {('slug',)},
|
||||
},
|
||||
bases=(tagulous.models.models.BaseTagModel, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Condition',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
('slug', models.SlugField()),
|
||||
('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
|
||||
('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
'abstract': False,
|
||||
'unique_together': {('slug',)},
|
||||
},
|
||||
bases=(tagulous.models.models.BaseTagModel, models.Model),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='rapid',
|
||||
name='condition',
|
||||
field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Associated condition. Will allow searching / filtering and tips / hints to be displayed. Conditions with spaces must be enclosed in quotes "..."', to='rapids.Condition'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='rapid',
|
||||
name='sign',
|
||||
field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Radiological signs in the question', to='rapids.Sign'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
# Generated by Django 3.1.3 on 2021-01-20 22:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rapids', '0003_auto_20210120_2206'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='rapid',
|
||||
name='condition',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='rapid',
|
||||
name='condition',
|
||||
field=models.CharField(blank=True, max_length=255),
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='rapid',
|
||||
name='sign',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='rapid',
|
||||
name='sign',
|
||||
field=models.CharField(blank=True, max_length=255),
|
||||
),
|
||||
]
|
||||
+12
-3
@@ -1,5 +1,8 @@
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
import tagulous
|
||||
import tagulous.models
|
||||
|
||||
|
||||
from django.core.files.storage import FileSystemStorage
|
||||
from django.conf import settings
|
||||
@@ -8,6 +11,7 @@ from django.utils.html import format_html
|
||||
from django.urls import reverse
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.html import mark_safe
|
||||
|
||||
from sortedm2m.fields import SortedManyToManyField
|
||||
|
||||
@@ -69,8 +73,11 @@ class Site(models.Model):
|
||||
return self.site
|
||||
|
||||
|
||||
#class Condition(tagulous.models.TagModel):
|
||||
# pass
|
||||
class Condition(tagulous.models.TagModel):
|
||||
pass
|
||||
|
||||
class Sign(tagulous.models.TagModel):
|
||||
pass
|
||||
|
||||
class Answer(models.Model):
|
||||
question = models.ForeignKey(
|
||||
@@ -142,13 +149,15 @@ class Rapid(models.Model):
|
||||
choices=LATERALITY_CHOICES,
|
||||
default=NONE,
|
||||
help_text="Applies to the answer, not the examination")
|
||||
condition = models.CharField(max_length=255, blank=True)
|
||||
#condition = tagulous.models.TagField(
|
||||
# to=Condition,
|
||||
# blank=True,
|
||||
# help_text=
|
||||
# "Associated condition. Will allow searching / filtering and tips / hints to be displayed. Conditions with spaces must be enclosed in quotes \"...\""
|
||||
#)
|
||||
#
|
||||
|
||||
sign = models.CharField(max_length=255, blank=True)
|
||||
#sign = tagulous.models.TagField(
|
||||
# to=Sign, blank=True, help_text='Radiological signs in the question')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user