.
This commit is contained in:
@@ -10,6 +10,7 @@ from .models import (
|
||||
SeriesFinding,
|
||||
Structure,
|
||||
PathalogicalProcess,
|
||||
Presentation,
|
||||
)
|
||||
|
||||
import tagulous.admin
|
||||
@@ -35,6 +36,7 @@ admin.site.register(Structure)
|
||||
admin.site.register(SeriesFinding)
|
||||
admin.site.register(Differential)
|
||||
admin.site.register(PathalogicalProcess)
|
||||
admin.site.register(Presentation)
|
||||
|
||||
|
||||
class DifferentialInline(admin.TabularInline):
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.2.8 on 2021-12-06 22:31
|
||||
|
||||
import atlas.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0016_auto_20211206_2224'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Presentation',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
('subspecialty', models.ManyToManyField(blank=True, to='atlas.Subspecialty')),
|
||||
],
|
||||
bases=(atlas.models.SynMixin, models.Model),
|
||||
),
|
||||
]
|
||||
@@ -130,6 +130,16 @@ class Condition(SynMixin, models.Model):
|
||||
def get_absolute_url(self):
|
||||
return reverse("atlas:condition_detail", kwargs={"pk": self.pk})
|
||||
|
||||
class Presentation(SynMixin, models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
|
||||
subspecialty = models.ManyToManyField("subspecialty", blank=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("atlas:presentation_detail", kwargs={"pk": self.pk})
|
||||
|
||||
class Subspecialty(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
Reference in New Issue
Block a user