-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add professioncategory and refactor professionimport to split
- Loading branch information
Showing
4 changed files
with
120 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from django.contrib import admin | ||
from reversion.admin import VersionAdmin | ||
|
||
from .models import Title, Event, Institution, Person, Place, Work, Source, Text, Profession | ||
from .models import Title, Event, Institution, Person, Place, Work, Source, Text, Profession, ProfessionCategory | ||
|
||
|
||
@admin.register(Title, Event, Institution, Person, Place, Work, Source, Text, Profession) | ||
@admin.register(Title, Event, Institution, Person, Place, Work, Source, Text, Profession, ProfessionCategory) | ||
class OeblAdmin(VersionAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
apis_ontology/migrations/0012_professioncategory_alter_profession_options_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Generated by Django 4.2.8 on 2023-12-18 11:54 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('apis_ontology', '0011_unaccent_20231214_0830'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ProfessionCategory', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255)), | ||
], | ||
), | ||
migrations.AlterModelOptions( | ||
name='profession', | ||
options={'ordering': ('name',)}, | ||
), | ||
migrations.RemoveField( | ||
model_name='profession', | ||
name='parent', | ||
), | ||
migrations.AddField( | ||
model_name='profession', | ||
name='oldids', | ||
field=models.TextField(null=True), | ||
), | ||
migrations.AddField( | ||
model_name='profession', | ||
name='oldnames', | ||
field=models.TextField(null=True), | ||
), | ||
migrations.AddField( | ||
model_name='person', | ||
name='professioncategory', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='apis_ontology.professioncategory'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters