-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from arthur-schnitzler/main
updates
- Loading branch information
Showing
15 changed files
with
449 additions
and
25 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
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,26 @@ | ||
import os | ||
import warnings | ||
|
||
from datetime import datetime | ||
from tqdm import tqdm | ||
from django.conf import settings | ||
from django.core.management.base import BaseCommand | ||
|
||
from apis_core.apis_metainfo.models import TempEntityClass | ||
from dumper.utils import write_report | ||
|
||
warnings.filterwarnings("ignore") | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "saves all TempEntity objects" | ||
|
||
def handle(self, *args, **kwargs): | ||
start_time = datetime.now().strftime(settings.PMB_TIME_PATTERN) | ||
items = TempEntityClass.objects.all() | ||
print(f"{items.count()} objects to save") | ||
for x in tqdm(items, total=items.count()): | ||
x.save() | ||
end_time = datetime.now().strftime(settings.PMB_TIME_PATTERN) | ||
report = [os.path.basename(__file__), start_time, end_time] | ||
write_report(report) |
52 changes: 52 additions & 0 deletions
52
...e/apis_entities/migrations/0003_alter_event_options_alter_institution_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,52 @@ | ||
# Generated by Django 5.0.1 on 2024-03-01 14:24 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("apis_entities", "0002_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="event", | ||
options={ | ||
"ordering": ["id"], | ||
"verbose_name": "Ereignis", | ||
"verbose_name_plural": "Ereignisse", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="institution", | ||
options={ | ||
"ordering": ["id"], | ||
"verbose_name": "Institution", | ||
"verbose_name_plural": "Institutionen", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="person", | ||
options={ | ||
"ordering": ["id"], | ||
"verbose_name": "Person", | ||
"verbose_name_plural": "Personen", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="place", | ||
options={ | ||
"ordering": ["id"], | ||
"verbose_name": "Ort", | ||
"verbose_name_plural": "Orte", | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="work", | ||
options={ | ||
"ordering": ["id"], | ||
"verbose_name": "Werk", | ||
"verbose_name_plural": "Werke", | ||
}, | ||
), | ||
] |
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
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
117 changes: 117 additions & 0 deletions
117
...is_relations/migrations/0003_alter_eventevent_options_alter_eventwork_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,117 @@ | ||
# Generated by Django 5.0.1 on 2024-03-01 14:24 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("apis_relations", "0002_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="eventevent", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="eventwork", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="institutionevent", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="institutioninstitution", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="institutionplace", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="institutionwork", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="personevent", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="personinstitution", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="personperson", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="personplace", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="personwork", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="placeevent", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="placeplace", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="placework", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
migrations.AlterModelOptions( | ||
name="workwork", | ||
options={ | ||
"default_manager_name": "objects", | ||
"ordering": ["start_date", "id"], | ||
}, | ||
), | ||
] |
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
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
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
Oops, something went wrong.