From 971a87d91a90fcf79314d635727411555446c113 Mon Sep 17 00:00:00 2001 From: Gregor Pirgie Date: Fri, 1 Mar 2024 14:04:41 +0100 Subject: [PATCH 1/6] breaking-change: revert app-renaming --- apis/settings/apisviecpro_backend_prod.py | 6 +- apis/settings/apisviecpro_backend_test.py | 6 +- apis/settings/dev.py | 6 +- apis/urls.py | 8 +- .../__init__.py | 0 .../admin.py | 0 .../apps.py | 2 +- .../forms.py | 12 +- .../logger.py | 0 .../models.py | 2 +- .../pdf_logger.py | 0 .../serializers.py | 0 .../viecpro_import/css/autocomplete.css | 0 .../static/viecpro_import/css/main.css | 0 .../static/viecpro_import/js/autocomplete.js | 0 .../viecpro_import/js/autocomplete.js.map | 0 .../static/viecpro_import/js/pdf_tool.js | 0 .../tables.py | 0 .../autoDate_button_generic_ajax_form.html | 0 .../custom_ajax_form_generic.html | 9 + .../element_datasource_update.html | 0 .../element_datasources_select_template.html | 0 .../element_datasources_upload.html | 0 .../element_project_create.html | 0 .../templates/pages/editor_page.html | 36 +- .../templates/pages/projects_page.html | 12 +- .../section_templates/datasource_browser.html | 0 .../generic_create_items_section.html | 0 .../generic_entity_meta_section.html | 4 +- .../generic_process_section.html | 0 .../generic_relations_section.html | 2 +- .../progress_created_template.html | 0 .../progress_deleted_template.html | 0 .../progress_edited_template.html | 0 .../tests.py | 0 .../upload_helper.py | 0 .../urls.py | 2 +- .../views.py | 12 +- .../__init__.py | 0 {viecpro_import => dubletten_tool}/admin.py | 0 .../apps.py | 2 +- .../auto_script.py | 0 .../create_datasets.py | 0 .../detail_view.py | 0 .../helper_functions/helper_functions.py | 0 .../helper_functions/loggers.py | 0 .../forms.py | 4 +- .../grouping_script_1.py | 0 .../helpers.py | 0 .../logger.py | 0 .../management/__init__.py | 0 .../management/commands/__init__.py | 0 .../management/commands/add_access_groups.py | 4 +- .../management/commands/merge_groups.py | 8 +- .../management/commands/setup_groups.py | 4 +- .../merge_filters.py | 0 .../merge_functions.py | 8 +- .../merge_tables.py | 2 +- .../merge_views.py | 6 +- .../models.py | 0 .../redis_client.py | 0 .../src/classes/ErrorLoggerMixin.py | 0 .../src/classes/MergeGroup.py | 2 +- .../src/classes/PPHelper.py | 0 .../src/classes/PPKind.py | 0 .../src/classes/PersonHelper.py | 0 .../src/classes/PersonType.py | 2 +- .../src/classes/ProcessingTracker.py | 0 .../src/classes/RelationWriter.py | 0 .../src/classes/RemergeHelper.py | 0 .../src/classes/TempRel.py | 0 .../src/classes/__init__.py | 4 +- .../src/classes/class_notes.md | 0 .../src/functions/helper_functions.py | 2 +- .../src/functions/remerge_single_group.py | 4 +- .../css/deduplication.css | 0 .../suggestions.py | 0 .../tasks.py | 4 +- .../templates/all_notes.html | 0 .../templates/del/ampel_action_template.html | 149 ++ .../templates/del/ampel_note_column.html | 0 .../templates/del/ampel_template_column.html | 0 .../templates/group_buttons.html | 0 .../templates/group_form.html | 0 .../templates/group_list.html | 0 .../templates/group_suggestions.html | 0 .../templates/member_list.html | 0 .../merge/ampel_action_template.html | 149 ++ .../templates/merge/ampel_note_column.html | 0 .../merge/ampel_template_column.html | 0 .../templates/merge/apis_create_entities.html | 0 .../templates/merge/compare_base.html | 0 .../detail_views/entity_detail_generic.html | 4 +- .../merge_tool_entity_detail_generic.html | 4 +- .../detail_views/person_detail_generic.html | 0 .../merge/entity_create_generic.html | 4 +- .../templates/merge/generic_list.html | 2 +- .../merge/mege_tool_generic_list.html | 4 +- .../templates/merge/merge_page.html | 0 .../merge_tool_entity_create_generic.html | 4 +- .../templates/merge/person_create.html | 0 .../merge/person_create_generic.html | 0 .../templates/merge/person_create_new.html | 0 .../templates/merge/person_list.html | 0 .../templates/merge/person_list_generic.html | 0 .../templates/merge/relation_editor.html | 8 +- .../templates/merge/tabbed_texts.html | 0 .../templates/note_form.html | 0 .../templates/note_template.html | 0 .../templates/person_detail.html | 0 .../templates/person_suggestions.html | 0 .../templates/singles_list.html | 0 dubletten_tool/templates/tool_page.html | 1827 +++++++++++++++++ {viecpro_import => dubletten_tool}/tests.py | 0 .../tests/__init__.py | 0 .../tests/error_logger_mixin_test.py | 0 .../tests/merge_group_test.py | 0 .../tests/person_helper_test.py | 0 .../tests/person_type_test.py | 0 .../tests/pphelper_test.py | 0 .../tests/ppkind_test.py | 0 .../tests/relation_writer_test.py | 0 .../tests/single_merge_test.py | 0 .../tests/temp_rel_test.py | 2 +- .../urls.py | 4 +- .../views.py | 0 notebooks/Create Sample 3D CHO.ipynb | 6 + .../migrations/0001_initial.py | 127 -- viecpro_deduplication/migrations/__init__.py | 0 .../templates/del/ampel_action_template.html | 138 -- .../merge/ampel_action_template.html | 138 -- .../templates/tool_page.html | 1636 --------------- viecpro_import/migrations/0001_initial.py | 135 -- viecpro_import/migrations/__init__.py | 0 .../custom_ajax_form_generic.html | 9 - webpage/templates/webpage/base.html | 13 +- 136 files changed, 2248 insertions(+), 2290 deletions(-) rename {viecpro_import => apis_import_project}/__init__.py (100%) rename {viecpro_deduplication => apis_import_project}/admin.py (100%) rename {viecpro_import => apis_import_project}/apps.py (69%) rename {viecpro_import => apis_import_project}/forms.py (98%) rename {viecpro_import => apis_import_project}/logger.py (100%) rename {viecpro_import => apis_import_project}/models.py (99%) rename {viecpro_import => apis_import_project}/pdf_logger.py (100%) rename {viecpro_import => apis_import_project}/serializers.py (100%) rename {viecpro_import => apis_import_project}/static/viecpro_import/css/autocomplete.css (100%) rename {viecpro_import => apis_import_project}/static/viecpro_import/css/main.css (100%) rename {viecpro_import => apis_import_project}/static/viecpro_import/js/autocomplete.js (100%) rename {viecpro_import => apis_import_project}/static/viecpro_import/js/autocomplete.js.map (100%) rename {viecpro_import => apis_import_project}/static/viecpro_import/js/pdf_tool.js (100%) rename {viecpro_import => apis_import_project}/tables.py (100%) rename {viecpro_import => apis_import_project}/templates/element_templates/autoDate_button_generic_ajax_form.html (100%) create mode 100644 apis_import_project/templates/element_templates/custom_ajax_form_generic.html rename {viecpro_import => apis_import_project}/templates/element_templates/element_datasource_update.html (100%) rename {viecpro_import => apis_import_project}/templates/element_templates/element_datasources_select_template.html (100%) rename {viecpro_import => apis_import_project}/templates/element_templates/element_datasources_upload.html (100%) rename {viecpro_import => apis_import_project}/templates/element_templates/element_project_create.html (100%) rename {viecpro_import => apis_import_project}/templates/pages/editor_page.html (95%) rename {viecpro_import => apis_import_project}/templates/pages/projects_page.html (84%) rename {viecpro_import => apis_import_project}/templates/section_templates/datasource_browser.html (100%) rename {viecpro_import => apis_import_project}/templates/section_templates/generic_create_items_section.html (100%) rename {viecpro_import => apis_import_project}/templates/section_templates/generic_entity_meta_section.html (90%) rename {viecpro_import => apis_import_project}/templates/section_templates/generic_process_section.html (100%) rename {viecpro_import => apis_import_project}/templates/section_templates/generic_relations_section.html (99%) rename {viecpro_import => apis_import_project}/templates/section_templates/progress_created_template.html (100%) rename {viecpro_import => apis_import_project}/templates/section_templates/progress_deleted_template.html (100%) rename {viecpro_import => apis_import_project}/templates/section_templates/progress_edited_template.html (100%) rename {viecpro_deduplication => apis_import_project}/tests.py (100%) rename {viecpro_import => apis_import_project}/upload_helper.py (100%) rename {viecpro_import => apis_import_project}/urls.py (99%) rename {viecpro_import => apis_import_project}/views.py (99%) rename {viecpro_deduplication => dubletten_tool}/__init__.py (100%) rename {viecpro_import => dubletten_tool}/admin.py (100%) rename {viecpro_deduplication => dubletten_tool}/apps.py (69%) rename {viecpro_deduplication => dubletten_tool}/auto_script.py (100%) rename {viecpro_deduplication => dubletten_tool}/create_datasets.py (100%) rename {viecpro_deduplication => dubletten_tool}/detail_view.py (100%) rename {viecpro_deduplication => dubletten_tool}/dump_improvements/helper_functions/helper_functions.py (100%) rename {viecpro_deduplication => dubletten_tool}/dump_improvements/helper_functions/loggers.py (100%) rename {viecpro_deduplication => dubletten_tool}/forms.py (89%) rename {viecpro_deduplication => dubletten_tool}/grouping_script_1.py (100%) rename {viecpro_deduplication => dubletten_tool}/helpers.py (100%) rename {viecpro_deduplication => dubletten_tool}/logger.py (100%) rename {viecpro_deduplication => dubletten_tool}/management/__init__.py (100%) rename {viecpro_deduplication => dubletten_tool}/management/commands/__init__.py (100%) rename {viecpro_deduplication => dubletten_tool}/management/commands/add_access_groups.py (96%) rename {viecpro_deduplication => dubletten_tool}/management/commands/merge_groups.py (79%) rename {viecpro_deduplication => dubletten_tool}/management/commands/setup_groups.py (96%) rename {viecpro_deduplication => dubletten_tool}/merge_filters.py (100%) rename {viecpro_deduplication => dubletten_tool}/merge_functions.py (97%) rename {viecpro_deduplication => dubletten_tool}/merge_tables.py (99%) rename {viecpro_deduplication => dubletten_tool}/merge_views.py (99%) rename {viecpro_deduplication => dubletten_tool}/models.py (100%) rename {viecpro_deduplication => dubletten_tool}/redis_client.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/ErrorLoggerMixin.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/MergeGroup.py (98%) rename {viecpro_deduplication => dubletten_tool}/src/classes/PPHelper.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/PPKind.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/PersonHelper.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/PersonType.py (96%) rename {viecpro_deduplication => dubletten_tool}/src/classes/ProcessingTracker.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/RelationWriter.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/RemergeHelper.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/TempRel.py (100%) rename {viecpro_deduplication => dubletten_tool}/src/classes/__init__.py (94%) rename {viecpro_deduplication => dubletten_tool}/src/classes/class_notes.md (100%) rename {viecpro_deduplication => dubletten_tool}/src/functions/helper_functions.py (97%) rename {viecpro_deduplication => dubletten_tool}/src/functions/remerge_single_group.py (95%) rename {viecpro_deduplication => dubletten_tool}/static/viecpro_deduplication/css/deduplication.css (100%) rename {viecpro_deduplication => dubletten_tool}/suggestions.py (100%) rename {viecpro_deduplication => dubletten_tool}/tasks.py (96%) rename {viecpro_deduplication => dubletten_tool}/templates/all_notes.html (100%) create mode 100644 dubletten_tool/templates/del/ampel_action_template.html rename {viecpro_deduplication => dubletten_tool}/templates/del/ampel_note_column.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/del/ampel_template_column.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/group_buttons.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/group_form.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/group_list.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/group_suggestions.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/member_list.html (100%) create mode 100644 dubletten_tool/templates/merge/ampel_action_template.html rename {viecpro_deduplication => dubletten_tool}/templates/merge/ampel_note_column.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/ampel_template_column.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/apis_create_entities.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/compare_base.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/detail_views/entity_detail_generic.html (98%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/detail_views/merge_tool_entity_detail_generic.html (98%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/detail_views/person_detail_generic.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/entity_create_generic.html (98%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/generic_list.html (99%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/mege_tool_generic_list.html (98%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/merge_page.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/merge_tool_entity_create_generic.html (98%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/person_create.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/person_create_generic.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/person_create_new.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/person_list.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/person_list_generic.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/relation_editor.html (97%) rename {viecpro_deduplication => dubletten_tool}/templates/merge/tabbed_texts.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/note_form.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/note_template.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/person_detail.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/person_suggestions.html (100%) rename {viecpro_deduplication => dubletten_tool}/templates/singles_list.html (100%) create mode 100644 dubletten_tool/templates/tool_page.html rename {viecpro_import => dubletten_tool}/tests.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/__init__.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/error_logger_mixin_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/merge_group_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/person_helper_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/person_type_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/pphelper_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/ppkind_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/relation_writer_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/single_merge_test.py (100%) rename {viecpro_deduplication => dubletten_tool}/tests/temp_rel_test.py (88%) rename {viecpro_deduplication => dubletten_tool}/urls.py (97%) rename {viecpro_deduplication => dubletten_tool}/views.py (100%) create mode 100644 notebooks/Create Sample 3D CHO.ipynb delete mode 100644 viecpro_deduplication/migrations/0001_initial.py delete mode 100644 viecpro_deduplication/migrations/__init__.py delete mode 100644 viecpro_deduplication/templates/del/ampel_action_template.html delete mode 100644 viecpro_deduplication/templates/merge/ampel_action_template.html delete mode 100644 viecpro_deduplication/templates/tool_page.html delete mode 100644 viecpro_import/migrations/0001_initial.py delete mode 100644 viecpro_import/migrations/__init__.py delete mode 100644 viecpro_import/templates/element_templates/custom_ajax_form_generic.html diff --git a/apis/settings/apisviecpro_backend_prod.py b/apis/settings/apisviecpro_backend_prod.py index c9e92d53..59ae0e9d 100644 --- a/apis/settings/apisviecpro_backend_prod.py +++ b/apis/settings/apisviecpro_backend_prod.py @@ -48,8 +48,8 @@ SPECTACULAR_SETTINGS["COMPONENT_NO_READ_ONLY_REQUIRED"] = True -INSTALLED_APPS += ["django_extensions", "viecpro_import", "apis_bibsonomy", "apis_ampel", - "viecpro_deduplication", "viecpro_hierarchy", "viecpro_typesense", "viecpro_typesense_detail", "django_celery_results"] +INSTALLED_APPS += ["django_extensions", "apis_import_project", "apis_bibsonomy", "apis_ampel", + "dubletten_tool", "viecpro_hierarchy", "viecpro_typesense", "viecpro_typesense_detail", "django_celery_results"] DATABASES = {"default": @@ -119,7 +119,7 @@ TEMPLATES[0]["DIRS"] += [ROBOTS_TXT_FOLDER, ] -VIECPRO_IMPORT_IIIF_BASE_URL = "https://iiif.acdh-dev.oeaw.ac.at/iiif/images/viecpro/" +apis_import_project_IIIF_BASE_URL = "https://iiif.acdh-dev.oeaw.ac.at/iiif/images/viecpro/" # Bibsonomy Settings diff --git a/apis/settings/apisviecpro_backend_test.py b/apis/settings/apisviecpro_backend_test.py index a72573c3..438e5a77 100644 --- a/apis/settings/apisviecpro_backend_test.py +++ b/apis/settings/apisviecpro_backend_test.py @@ -48,8 +48,8 @@ SPECTACULAR_SETTINGS["COMPONENT_NO_READ_ONLY_REQUIRED"] = True -INSTALLED_APPS += ["django_extensions", "viecpro_import","apis_bibsonomy", "apis_ampel", - "viecpro_deduplication", "viecpro_hierarchy", "viecpro_typesense", "viecpro_typesense_detail", "django_celery_results"] +INSTALLED_APPS += ["django_extensions", "apis_import_project","apis_bibsonomy", "apis_ampel", + "dubletten_tool", "viecpro_hierarchy", "viecpro_typesense", "viecpro_typesense_detail", "django_celery_results"] DATABASES = {"default": @@ -119,7 +119,7 @@ TEMPLATES[0]["DIRS"] += [ROBOTS_TXT_FOLDER, ] -VIECPRO_IMPORT_IIIF_BASE_URL = "https://iiif.acdh-dev.oeaw.ac.at/iiif/images/viecpro/" +apis_import_project_IIIF_BASE_URL = "https://iiif.acdh-dev.oeaw.ac.at/iiif/images/viecpro/" # Bibsonomy Settings diff --git a/apis/settings/dev.py b/apis/settings/dev.py index 49d32805..be59f17b 100644 --- a/apis/settings/dev.py +++ b/apis/settings/dev.py @@ -47,8 +47,8 @@ SPECTACULAR_SETTINGS["COMPONENT_NO_READ_ONLY_REQUIRED"] = True -INSTALLED_APPS += ["django_extensions", "viecpro_import", "debug_toolbar", "apis_bibsonomy", "apis_ampel", - "viecpro_deduplication", "viecpro_hierarchy", "viecpro_typesense", "viecpro_typesense_detail", "django_celery_results"] +INSTALLED_APPS += ["django_extensions", "apis_import_project", "debug_toolbar", "apis_bibsonomy", "apis_ampel", + "dubletten_tool", "viecpro_hierarchy", "viecpro_typesense", "viecpro_typesense_detail", "django_celery_results"] DATABASES = {"default": @@ -118,7 +118,7 @@ TEMPLATES[0]["DIRS"] += [ROBOTS_TXT_FOLDER, ] -VIECPRO_IMPORT_IIIF_BASE_URL = "https://iiif.acdh-dev.oeaw.ac.at/iiif/images/viecpro/" +apis_import_project_IIIF_BASE_URL = "https://iiif.acdh-dev.oeaw.ac.at/iiif/images/viecpro/" # Bibsonomy Settings diff --git a/apis/urls.py b/apis/urls.py index ebf83594..305c3791 100644 --- a/apis/urls.py +++ b/apis/urls.py @@ -26,13 +26,13 @@ urlpatterns.insert(0, url(r'^visualisations/', include("viecpro_hierarchy.urls", namespace="viecpro_hierarchy")) ) -if 'viecpro_import' in settings.INSTALLED_APPS: +if 'apis_import_project' in settings.INSTALLED_APPS: urlpatterns = urlpatterns + [ - url(r'^viecpro_import/', include("viecpro_import.urls", namespace="viecpro_import"))] + url(r'^apis_import_project/', include("apis_import_project.urls", namespace="apis_import_project"))] -if 'viecpro_deduplication' in settings.INSTALLED_APPS: +if 'dubletten_tool' in settings.INSTALLED_APPS: urlpatterns = urlpatterns + [ - url(r'^dubletten/', include("viecpro_deduplication.urls", namespace="viecpro_deduplication")), + url(r'^dubletten/', include("dubletten_tool.urls", namespace="dubletten_tool")), ] if "apis_bibsonomy" in settings.INSTALLED_APPS: diff --git a/viecpro_import/__init__.py b/apis_import_project/__init__.py similarity index 100% rename from viecpro_import/__init__.py rename to apis_import_project/__init__.py diff --git a/viecpro_deduplication/admin.py b/apis_import_project/admin.py similarity index 100% rename from viecpro_deduplication/admin.py rename to apis_import_project/admin.py diff --git a/viecpro_import/apps.py b/apis_import_project/apps.py similarity index 69% rename from viecpro_import/apps.py rename to apis_import_project/apps.py index 1e8e4842..1896e790 100644 --- a/viecpro_import/apps.py +++ b/apis_import_project/apps.py @@ -2,4 +2,4 @@ class ViecproImportConfig(AppConfig): - name = 'viecpro_import' + name = 'apis_import_project' diff --git a/viecpro_import/forms.py b/apis_import_project/forms.py similarity index 98% rename from viecpro_import/forms.py rename to apis_import_project/forms.py index 65a4679f..ef5b23cd 100644 --- a/viecpro_import/forms.py +++ b/apis_import_project/forms.py @@ -24,7 +24,7 @@ from apis_core.apis_relations.models import AbstractRelation from apis_core.apis_vocabularies.models import VocabsBaseClass, AbstractRelationType from apis_core.apis_labels.forms import LabelForm -from viecpro_import.tables import get_generic_relations_table +from apis_import_project.tables import get_generic_relations_table from apis_core.helper_functions import DateParser @@ -94,7 +94,7 @@ def __init__(self, user=None, *args, **kwargs): self.helper.add_input(Submit("submit", "Submit")) self.helper.add_input(Button('cancel', 'Cancel', css_class='btn-danger', onclick="window.location.href = '{}';".format( - reverse('viecpro_import:project_main')))) + reverse('apis_import_project:project_main')))) class UploadFileForm(forms.Form): @@ -424,7 +424,7 @@ class GenericLabelForm(LabelForm): # super(GenericLabelForm, self).__init__(*args, **kwargs) # self.helper.form_tag = True # self.helper.form_method = "post" -# self.helper.form_action = f"/viecpro_import/create_item/Label" +# self.helper.form_action = f"/apis_import_project/create_item/Label" def get_generic_vocabs_form(model_name): module = "apis_core.apis_vocabularies.models" @@ -444,7 +444,7 @@ def __init__(self, *args, **kwargs): Submit("submit", "save", css_class=f"{model_name}Form")) self.helper.form_method = "post" self.helper.form_class = "form pdf_tool_itemcreate" - self.helper.form_action = reverse("viecpro_import:item_create", kwargs={ + self.helper.form_action = reverse("apis_import_project:item_create", kwargs={ "model_name": model_name}) self.helper.layout = Layout(Field("name", id=f"{model_name}_name_field")) @@ -470,7 +470,7 @@ def __init__(self, *args, **kwargs): Submit("submit", "save", css_class=f"{model_name}Form")) self.helper.form_method = "post" self.helper.form_class = "form pdf_tool_itemcreate" - self.helper.form_action = reverse("viecpro_import:item_create", kwargs={ + self.helper.form_action = reverse("apis_import_project:item_create", kwargs={ "model_name": model_name}) self.helper.layout = Layout(Field("name", id=f"{model_name}Form_name_field"), Field("name_reverse", id=f"{model_name}Form_name_reverse_field")) @@ -496,7 +496,7 @@ def __init__(self, *args, **kwargs): Submit("submit", "save", css_class=f"{model_name}Form")) self.helper.form_method = "post" self.helper.form_class = "form pdf_tool_itemcreate" - self.helper.form_action = reverse("viecpro_import:item_create", kwargs={ + self.helper.form_action = reverse("apis_import_project:item_create", kwargs={ "model_name": model_name}) self.helper.layout = Layout(Field("name", id=f"{model_name}Form_name_field"), Field("description", id=f"{model_name}Form_description_field")) diff --git a/viecpro_import/logger.py b/apis_import_project/logger.py similarity index 100% rename from viecpro_import/logger.py rename to apis_import_project/logger.py diff --git a/viecpro_import/models.py b/apis_import_project/models.py similarity index 99% rename from viecpro_import/models.py rename to apis_import_project/models.py index f95dfb60..acebe376 100644 --- a/viecpro_import/models.py +++ b/apis_import_project/models.py @@ -54,7 +54,7 @@ def get_page_url(self, page_num): :rtype: str """ - base_path = settings.VIECPRO_IMPORT_IIIF_BASE_URL + base_path = settings.apis_import_project_IIIF_BASE_URL if not base_path.endswith("/"): base_path += "/" diff --git a/viecpro_import/pdf_logger.py b/apis_import_project/pdf_logger.py similarity index 100% rename from viecpro_import/pdf_logger.py rename to apis_import_project/pdf_logger.py diff --git a/viecpro_import/serializers.py b/apis_import_project/serializers.py similarity index 100% rename from viecpro_import/serializers.py rename to apis_import_project/serializers.py diff --git a/viecpro_import/static/viecpro_import/css/autocomplete.css b/apis_import_project/static/viecpro_import/css/autocomplete.css similarity index 100% rename from viecpro_import/static/viecpro_import/css/autocomplete.css rename to apis_import_project/static/viecpro_import/css/autocomplete.css diff --git a/viecpro_import/static/viecpro_import/css/main.css b/apis_import_project/static/viecpro_import/css/main.css similarity index 100% rename from viecpro_import/static/viecpro_import/css/main.css rename to apis_import_project/static/viecpro_import/css/main.css diff --git a/viecpro_import/static/viecpro_import/js/autocomplete.js b/apis_import_project/static/viecpro_import/js/autocomplete.js similarity index 100% rename from viecpro_import/static/viecpro_import/js/autocomplete.js rename to apis_import_project/static/viecpro_import/js/autocomplete.js diff --git a/viecpro_import/static/viecpro_import/js/autocomplete.js.map b/apis_import_project/static/viecpro_import/js/autocomplete.js.map similarity index 100% rename from viecpro_import/static/viecpro_import/js/autocomplete.js.map rename to apis_import_project/static/viecpro_import/js/autocomplete.js.map diff --git a/viecpro_import/static/viecpro_import/js/pdf_tool.js b/apis_import_project/static/viecpro_import/js/pdf_tool.js similarity index 100% rename from viecpro_import/static/viecpro_import/js/pdf_tool.js rename to apis_import_project/static/viecpro_import/js/pdf_tool.js diff --git a/viecpro_import/tables.py b/apis_import_project/tables.py similarity index 100% rename from viecpro_import/tables.py rename to apis_import_project/tables.py diff --git a/viecpro_import/templates/element_templates/autoDate_button_generic_ajax_form.html b/apis_import_project/templates/element_templates/autoDate_button_generic_ajax_form.html similarity index 100% rename from viecpro_import/templates/element_templates/autoDate_button_generic_ajax_form.html rename to apis_import_project/templates/element_templates/autoDate_button_generic_ajax_form.html diff --git a/apis_import_project/templates/element_templates/custom_ajax_form_generic.html b/apis_import_project/templates/element_templates/custom_ajax_form_generic.html new file mode 100644 index 00000000..9293481f --- /dev/null +++ b/apis_import_project/templates/element_templates/custom_ajax_form_generic.html @@ -0,0 +1,9 @@ +
+
+ {% load crispy_forms_tags %} + {% crispy form form.helper %} +
+ +
+
+
\ No newline at end of file diff --git a/viecpro_import/templates/element_templates/element_datasource_update.html b/apis_import_project/templates/element_templates/element_datasource_update.html similarity index 100% rename from viecpro_import/templates/element_templates/element_datasource_update.html rename to apis_import_project/templates/element_templates/element_datasource_update.html diff --git a/viecpro_import/templates/element_templates/element_datasources_select_template.html b/apis_import_project/templates/element_templates/element_datasources_select_template.html similarity index 100% rename from viecpro_import/templates/element_templates/element_datasources_select_template.html rename to apis_import_project/templates/element_templates/element_datasources_select_template.html diff --git a/viecpro_import/templates/element_templates/element_datasources_upload.html b/apis_import_project/templates/element_templates/element_datasources_upload.html similarity index 100% rename from viecpro_import/templates/element_templates/element_datasources_upload.html rename to apis_import_project/templates/element_templates/element_datasources_upload.html diff --git a/viecpro_import/templates/element_templates/element_project_create.html b/apis_import_project/templates/element_templates/element_project_create.html similarity index 100% rename from viecpro_import/templates/element_templates/element_project_create.html rename to apis_import_project/templates/element_templates/element_project_create.html diff --git a/viecpro_import/templates/pages/editor_page.html b/apis_import_project/templates/pages/editor_page.html similarity index 95% rename from viecpro_import/templates/pages/editor_page.html rename to apis_import_project/templates/pages/editor_page.html index 15624d9d..d6c8554e 100644 --- a/viecpro_import/templates/pages/editor_page.html +++ b/apis_import_project/templates/pages/editor_page.html @@ -2,9 +2,9 @@ {% load static %} {% block content %} - - - + + + @@ -169,7 +169,7 @@


}) function setPageToken() { - let url = "{% url 'viecpro_import:page_set_token' %}"; + let url = "{% url 'apis_import_project:page_set_token' %}"; //console.log("called set token") let token = prompt("New token:"); @@ -242,7 +242,7 @@


} $.ajax({ - url: '{% url "viecpro_import:editor_session_update" %}', + url: '{% url "apis_import_project:editor_session_update" %}', type: 'POST', data: { "ent_type": type, "ent_pk": entity_pk }, beforeSend: function (request) { @@ -299,7 +299,7 @@


function updatePageSection(section) { console.log("update page section called, section is:", section); - let url = `/viecpro_import/editor/section/update/${section}/`; + let url = `/apis_import_project/editor/section/update/${section}/`; $.ajax({ type: "GET", url: url, @@ -374,7 +374,7 @@


function loadPageSection() { - let url = "{% url 'viecpro_import:get_sections' %}"//`/viecpro_import/entity_custom/`; + let url = "{% url 'apis_import_project:get_sections' %}"//`/apis_import_project/entity_custom/`; $.ajax({ type: "GET", url: url, @@ -419,7 +419,7 @@


function AjaxElementRequest(type, target_id = null, entity = null) { if (!["LabelType", "Title"].includes(entity) && !entity.endsWith("elation") && !entity.endsWith("ype")) { - let url = `/viecpro_import/editor/entity/create/${entity}/`; + let url = `/apis_import_project/editor/entity/create/${entity}/`; $.ajax({ type: "GET", url: url, @@ -460,7 +460,7 @@


$("#input_search").val([]); await fetch( - `/viecpro_import/editor/autocomplete/${type}/`, + `/apis_import_project/editor/autocomplete/${type}/`, function (d) { if (!d.ok) { alert( @@ -518,7 +518,7 @@


let datasource_pk = $("#input_select").val(); if (datasource_pk) { $.ajax({ - url: '{% url "viecpro_import:ds_select" %}', + url: '{% url "apis_import_project:ds_select" %}', type: 'POST', data: { "ds_pk": datasource_pk, "first_call": first_call }, beforeSend: function (request) { @@ -557,7 +557,7 @@


function updateRelationDate(clicked_el, rel_id) { let tab = $(clicked_el).closest(".card-body").attr("id"); // changed this from event.target - let url = `/viecpro_import/editor/relation/autodate/${rel_id}/${tab}/`; + let url = `/apis_import_project/editor/relation/autodate/${rel_id}/${tab}/`; $.ajax({ type: "POST", url: url, @@ -592,7 +592,7 @@


let page_token = prompt("Enter new page token for this page\nAll concurrent pages will be updated."); if (page_token) { - let url = "{% url 'viecpro_import:page_set_start' %}" + let url = "{% url 'apis_import_project:page_set_start' %}" $.ajax({ type: "POST", @@ -612,7 +612,7 @@


function updateBrowserPage(page = null, direction = null, refresh_progress = true) { let page_num = page - let url = "{% url 'viecpro_import:browser_refresh' %}"; + let url = "{% url 'apis_import_project:browser_refresh' %}"; $.ajax({ type: "POST", url: url, @@ -632,7 +632,7 @@


function callUpload() { - let url = "{% url 'viecpro_import:ds_upload' %}"; + let url = "{% url 'apis_import_project:ds_upload' %}"; $.ajax({ type: "GET", url: url, @@ -655,7 +655,7 @@


function updateDataSourceSelect(ds_pk) { - let url = '{% url "viecpro_import:ds_list_refresh" %}'; + let url = '{% url "apis_import_project:ds_list_refresh" %}'; $.ajax({ type: "POST", url: url, @@ -677,7 +677,7 @@


} async function postUploadData(element) { - let url = "{% url 'viecpro_import:ds_upload' %}"; + let url = "{% url 'apis_import_project:ds_upload' %}"; $.ajax({ type: "POST", url: url, @@ -707,7 +707,7 @@


function editDataSource() { $.ajax({ type: 'GET', - url: "{% url 'viecpro_import:ds_update' %}", + url: "{% url 'apis_import_project:ds_update' %}", beforeSend: function (request) { let csrftoken = getCookie("csrftoken"); request.setRequestHeader("X-CSRFToken", csrftoken); @@ -718,7 +718,7 @@


//console.log("reached success"); event.preventDefault(); event.stopPropagation(); - let url = "{% url 'viecpro_import:ds_update' %}"; + let url = "{% url 'apis_import_project:ds_update' %}"; let formData = $(this).serialize(); $.ajax({ diff --git a/viecpro_import/templates/pages/projects_page.html b/apis_import_project/templates/pages/projects_page.html similarity index 84% rename from viecpro_import/templates/pages/projects_page.html rename to apis_import_project/templates/pages/projects_page.html index 4c2d5b5e..9d2b4b56 100644 --- a/viecpro_import/templates/pages/projects_page.html +++ b/apis_import_project/templates/pages/projects_page.html @@ -3,9 +3,9 @@ {% block content %} - - - + + +
@@ -38,7 +38,7 @@

Projects

{% for project, role in projects %} - {{project.name}} + {{project.name}} {{role}} @@ -55,7 +55,7 @@

Projects

+ diff --git a/viecpro_deduplication/templates/del/ampel_note_column.html b/dubletten_tool/templates/del/ampel_note_column.html similarity index 100% rename from viecpro_deduplication/templates/del/ampel_note_column.html rename to dubletten_tool/templates/del/ampel_note_column.html diff --git a/viecpro_deduplication/templates/del/ampel_template_column.html b/dubletten_tool/templates/del/ampel_template_column.html similarity index 100% rename from viecpro_deduplication/templates/del/ampel_template_column.html rename to dubletten_tool/templates/del/ampel_template_column.html diff --git a/viecpro_deduplication/templates/group_buttons.html b/dubletten_tool/templates/group_buttons.html similarity index 100% rename from viecpro_deduplication/templates/group_buttons.html rename to dubletten_tool/templates/group_buttons.html diff --git a/viecpro_deduplication/templates/group_form.html b/dubletten_tool/templates/group_form.html similarity index 100% rename from viecpro_deduplication/templates/group_form.html rename to dubletten_tool/templates/group_form.html diff --git a/viecpro_deduplication/templates/group_list.html b/dubletten_tool/templates/group_list.html similarity index 100% rename from viecpro_deduplication/templates/group_list.html rename to dubletten_tool/templates/group_list.html diff --git a/viecpro_deduplication/templates/group_suggestions.html b/dubletten_tool/templates/group_suggestions.html similarity index 100% rename from viecpro_deduplication/templates/group_suggestions.html rename to dubletten_tool/templates/group_suggestions.html diff --git a/viecpro_deduplication/templates/member_list.html b/dubletten_tool/templates/member_list.html similarity index 100% rename from viecpro_deduplication/templates/member_list.html rename to dubletten_tool/templates/member_list.html diff --git a/dubletten_tool/templates/merge/ampel_action_template.html b/dubletten_tool/templates/merge/ampel_action_template.html new file mode 100644 index 00000000..9910edf3 --- /dev/null +++ b/dubletten_tool/templates/merge/ampel_action_template.html @@ -0,0 +1,149 @@ +
+
+
+
+ {% if instance.ampel.note %} + + {% else %} + + {% endif %} +
+ + diff --git a/viecpro_deduplication/templates/merge/ampel_note_column.html b/dubletten_tool/templates/merge/ampel_note_column.html similarity index 100% rename from viecpro_deduplication/templates/merge/ampel_note_column.html rename to dubletten_tool/templates/merge/ampel_note_column.html diff --git a/viecpro_deduplication/templates/merge/ampel_template_column.html b/dubletten_tool/templates/merge/ampel_template_column.html similarity index 100% rename from viecpro_deduplication/templates/merge/ampel_template_column.html rename to dubletten_tool/templates/merge/ampel_template_column.html diff --git a/viecpro_deduplication/templates/merge/apis_create_entities.html b/dubletten_tool/templates/merge/apis_create_entities.html similarity index 100% rename from viecpro_deduplication/templates/merge/apis_create_entities.html rename to dubletten_tool/templates/merge/apis_create_entities.html diff --git a/viecpro_deduplication/templates/merge/compare_base.html b/dubletten_tool/templates/merge/compare_base.html similarity index 100% rename from viecpro_deduplication/templates/merge/compare_base.html rename to dubletten_tool/templates/merge/compare_base.html diff --git a/viecpro_deduplication/templates/merge/detail_views/entity_detail_generic.html b/dubletten_tool/templates/merge/detail_views/entity_detail_generic.html similarity index 98% rename from viecpro_deduplication/templates/merge/detail_views/entity_detail_generic.html rename to dubletten_tool/templates/merge/detail_views/entity_detail_generic.html index a1ed3e8f..da7c65f7 100644 --- a/viecpro_deduplication/templates/merge/detail_views/entity_detail_generic.html +++ b/dubletten_tool/templates/merge/detail_views/entity_detail_generic.html @@ -31,7 +31,7 @@

{% if object.get_listview_url %} - + vorfinal {% else %} @@ -58,7 +58,7 @@

{% endif %} | - Editor + Editor {% endif %} | {% include "ampel/ampel_inline_template.html" with instance=object %} diff --git a/viecpro_deduplication/templates/merge/detail_views/merge_tool_entity_detail_generic.html b/dubletten_tool/templates/merge/detail_views/merge_tool_entity_detail_generic.html similarity index 98% rename from viecpro_deduplication/templates/merge/detail_views/merge_tool_entity_detail_generic.html rename to dubletten_tool/templates/merge/detail_views/merge_tool_entity_detail_generic.html index 3234b77c..4e3c1250 100644 --- a/viecpro_deduplication/templates/merge/detail_views/merge_tool_entity_detail_generic.html +++ b/dubletten_tool/templates/merge/detail_views/merge_tool_entity_detail_generic.html @@ -31,7 +31,7 @@

{% if object.get_listview_url %} - + vorfinal {% else %} @@ -58,7 +58,7 @@

{% endif %} | - Editor + Editor {% endif %} | {% include "../ampel_action_template.html" with instance=object %} diff --git a/viecpro_deduplication/templates/merge/detail_views/person_detail_generic.html b/dubletten_tool/templates/merge/detail_views/person_detail_generic.html similarity index 100% rename from viecpro_deduplication/templates/merge/detail_views/person_detail_generic.html rename to dubletten_tool/templates/merge/detail_views/person_detail_generic.html diff --git a/viecpro_deduplication/templates/merge/entity_create_generic.html b/dubletten_tool/templates/merge/entity_create_generic.html similarity index 98% rename from viecpro_deduplication/templates/merge/entity_create_generic.html rename to dubletten_tool/templates/merge/entity_create_generic.html index 96f0ba51..24aed593 100644 --- a/viecpro_deduplication/templates/merge/entity_create_generic.html +++ b/dubletten_tool/templates/merge/entity_create_generic.html @@ -20,7 +20,7 @@
-

+

vorfinal {{ instance }} @@ -30,7 +30,7 @@

| - Editor + Editor | {% include "ampel/ampel_inline_template.html" with instance=instance %}

diff --git a/viecpro_deduplication/templates/merge/generic_list.html b/dubletten_tool/templates/merge/generic_list.html similarity index 99% rename from viecpro_deduplication/templates/merge/generic_list.html rename to dubletten_tool/templates/merge/generic_list.html index b6ad5ecf..10284e28 100644 --- a/viecpro_deduplication/templates/merge/generic_list.html +++ b/dubletten_tool/templates/merge/generic_list.html @@ -186,7 +186,7 @@

create new {{ entity }}

function updateCollections(){ console.log("update collections clicked") - url = "{% url 'viecpro_deduplication:update_collections' %}" + url = "{% url 'dubletten_tool:update_collections' %}" $.ajax({ url: url, type: "GET", diff --git a/viecpro_deduplication/templates/merge/mege_tool_generic_list.html b/dubletten_tool/templates/merge/mege_tool_generic_list.html similarity index 98% rename from viecpro_deduplication/templates/merge/mege_tool_generic_list.html rename to dubletten_tool/templates/merge/mege_tool_generic_list.html index 7b161330..f2715d61 100644 --- a/viecpro_deduplication/templates/merge/mege_tool_generic_list.html +++ b/dubletten_tool/templates/merge/mege_tool_generic_list.html @@ -188,7 +188,7 @@

create new {{ entity }}

console.log("ampel id in listgetnote", ampel_id) let note_text; - fetch("{% url 'viecpro_deduplication:get_note_text' ampel_pk='111122223333'%}".replace("111122223333", ampel_id)) + fetch("{% url 'dubletten_tool:get_note_text' ampel_pk='111122223333'%}".replace("111122223333", ampel_id)) .then((res)=> res.json()) .then((j) => { if (j.success){ console.log(j); @@ -208,7 +208,7 @@

create new {{ entity }}

$.ajax({ type: "POST", - url: "{% url 'viecpro_deduplication:update_note_text' %}", + url: "{% url 'dubletten_tool:update_note_text' %}", data: { "id": ampel_id, "note_text": text, diff --git a/viecpro_deduplication/templates/merge/merge_page.html b/dubletten_tool/templates/merge/merge_page.html similarity index 100% rename from viecpro_deduplication/templates/merge/merge_page.html rename to dubletten_tool/templates/merge/merge_page.html diff --git a/viecpro_deduplication/templates/merge/merge_tool_entity_create_generic.html b/dubletten_tool/templates/merge/merge_tool_entity_create_generic.html similarity index 98% rename from viecpro_deduplication/templates/merge/merge_tool_entity_create_generic.html rename to dubletten_tool/templates/merge/merge_tool_entity_create_generic.html index 8e9d2dce..5f6b9358 100644 --- a/viecpro_deduplication/templates/merge/merge_tool_entity_create_generic.html +++ b/dubletten_tool/templates/merge/merge_tool_entity_create_generic.html @@ -20,7 +20,7 @@
-

+

vorfinal {{ instance }} @@ -30,7 +30,7 @@

| - Editor + Editor | {% include "./ampel_action_template.html" with instance=instance %}

diff --git a/viecpro_deduplication/templates/merge/person_create.html b/dubletten_tool/templates/merge/person_create.html similarity index 100% rename from viecpro_deduplication/templates/merge/person_create.html rename to dubletten_tool/templates/merge/person_create.html diff --git a/viecpro_deduplication/templates/merge/person_create_generic.html b/dubletten_tool/templates/merge/person_create_generic.html similarity index 100% rename from viecpro_deduplication/templates/merge/person_create_generic.html rename to dubletten_tool/templates/merge/person_create_generic.html diff --git a/viecpro_deduplication/templates/merge/person_create_new.html b/dubletten_tool/templates/merge/person_create_new.html similarity index 100% rename from viecpro_deduplication/templates/merge/person_create_new.html rename to dubletten_tool/templates/merge/person_create_new.html diff --git a/viecpro_deduplication/templates/merge/person_list.html b/dubletten_tool/templates/merge/person_list.html similarity index 100% rename from viecpro_deduplication/templates/merge/person_list.html rename to dubletten_tool/templates/merge/person_list.html diff --git a/viecpro_deduplication/templates/merge/person_list_generic.html b/dubletten_tool/templates/merge/person_list_generic.html similarity index 100% rename from viecpro_deduplication/templates/merge/person_list_generic.html rename to dubletten_tool/templates/merge/person_list_generic.html diff --git a/viecpro_deduplication/templates/merge/relation_editor.html b/dubletten_tool/templates/merge/relation_editor.html similarity index 97% rename from viecpro_deduplication/templates/merge/relation_editor.html rename to dubletten_tool/templates/merge/relation_editor.html index f848b871..6c58e417 100644 --- a/viecpro_deduplication/templates/merge/relation_editor.html +++ b/dubletten_tool/templates/merge/relation_editor.html @@ -7,7 +7,7 @@

- + vorfinal {{object}} {% if user.is_authenticated %} @@ -161,7 +161,7 @@

Texts

console.log("new rel",new_rel) $.ajax({ type: "POST", - url: "{% url 'viecpro_deduplication:create_relation'%}", + url: "{% url 'dubletten_tool:create_relation'%}", data: { "id": id , "relation": JSON.stringify(new_rel), @@ -209,7 +209,7 @@

Texts

const confirmed = confirm(`Are you sure you want to delete\n${el.relation_type__name}`) console.log(el, confirmed) if (confirmed) { - fetch("{% url 'viecpro_deduplication:delete_relation' rel_id='000000000'%}".replace("000000000", el.id)).then((res)=> res.json()).then((j)=> { + fetch("{% url 'dubletten_tool:delete_relation' rel_id='000000000'%}".replace("000000000", el.id)).then((res)=> res.json()).then((j)=> { if (j.success){ if (!tabular.value){ console.log("not tabular") @@ -237,7 +237,7 @@

Texts

console.log("update field response called") $.ajax({ type:"POST", - url: "{% url 'viecpro_deduplication:update_field'%}", + url: "{% url 'dubletten_tool:update_field'%}", data: { "id": id, "field_name":fieldName, diff --git a/viecpro_deduplication/templates/merge/tabbed_texts.html b/dubletten_tool/templates/merge/tabbed_texts.html similarity index 100% rename from viecpro_deduplication/templates/merge/tabbed_texts.html rename to dubletten_tool/templates/merge/tabbed_texts.html diff --git a/viecpro_deduplication/templates/note_form.html b/dubletten_tool/templates/note_form.html similarity index 100% rename from viecpro_deduplication/templates/note_form.html rename to dubletten_tool/templates/note_form.html diff --git a/viecpro_deduplication/templates/note_template.html b/dubletten_tool/templates/note_template.html similarity index 100% rename from viecpro_deduplication/templates/note_template.html rename to dubletten_tool/templates/note_template.html diff --git a/viecpro_deduplication/templates/person_detail.html b/dubletten_tool/templates/person_detail.html similarity index 100% rename from viecpro_deduplication/templates/person_detail.html rename to dubletten_tool/templates/person_detail.html diff --git a/viecpro_deduplication/templates/person_suggestions.html b/dubletten_tool/templates/person_suggestions.html similarity index 100% rename from viecpro_deduplication/templates/person_suggestions.html rename to dubletten_tool/templates/person_suggestions.html diff --git a/viecpro_deduplication/templates/singles_list.html b/dubletten_tool/templates/singles_list.html similarity index 100% rename from viecpro_deduplication/templates/singles_list.html rename to dubletten_tool/templates/singles_list.html diff --git a/dubletten_tool/templates/tool_page.html b/dubletten_tool/templates/tool_page.html new file mode 100644 index 00000000..1d975576 --- /dev/null +++ b/dubletten_tool/templates/tool_page.html @@ -0,0 +1,1827 @@ +{% extends "webpage/base.html" %} {% load static %} {% load +stats_extras %} {% load webpage_extras %} {% block content %} + + + +
+
+
+ + + + +
+
+
+
+

Performing manual merge / re-merge...

+ +
+
+
+
+
+
+
+
+ +
+
+
+ +

Selected

+ + +
+
+
+ +

Detail / Suggestions

+ +
+
+
+ +
+
+
+
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + + + {% for b in Buttons %} {% if forloop.first %} + + {% elif forloop.last %} + + + {% else %} + + + {% endif %} {% endfor %} + + + + + + + +
+
+
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + + +
+
    + +
+
+
+
+ Not implemented yet +
+
+
+
+
+

Singles

+ +
+
+
+
+ + + + + + + + + + + + + + + {% endblock %} +
diff --git a/viecpro_import/tests.py b/dubletten_tool/tests.py similarity index 100% rename from viecpro_import/tests.py rename to dubletten_tool/tests.py diff --git a/viecpro_deduplication/tests/__init__.py b/dubletten_tool/tests/__init__.py similarity index 100% rename from viecpro_deduplication/tests/__init__.py rename to dubletten_tool/tests/__init__.py diff --git a/viecpro_deduplication/tests/error_logger_mixin_test.py b/dubletten_tool/tests/error_logger_mixin_test.py similarity index 100% rename from viecpro_deduplication/tests/error_logger_mixin_test.py rename to dubletten_tool/tests/error_logger_mixin_test.py diff --git a/viecpro_deduplication/tests/merge_group_test.py b/dubletten_tool/tests/merge_group_test.py similarity index 100% rename from viecpro_deduplication/tests/merge_group_test.py rename to dubletten_tool/tests/merge_group_test.py diff --git a/viecpro_deduplication/tests/person_helper_test.py b/dubletten_tool/tests/person_helper_test.py similarity index 100% rename from viecpro_deduplication/tests/person_helper_test.py rename to dubletten_tool/tests/person_helper_test.py diff --git a/viecpro_deduplication/tests/person_type_test.py b/dubletten_tool/tests/person_type_test.py similarity index 100% rename from viecpro_deduplication/tests/person_type_test.py rename to dubletten_tool/tests/person_type_test.py diff --git a/viecpro_deduplication/tests/pphelper_test.py b/dubletten_tool/tests/pphelper_test.py similarity index 100% rename from viecpro_deduplication/tests/pphelper_test.py rename to dubletten_tool/tests/pphelper_test.py diff --git a/viecpro_deduplication/tests/ppkind_test.py b/dubletten_tool/tests/ppkind_test.py similarity index 100% rename from viecpro_deduplication/tests/ppkind_test.py rename to dubletten_tool/tests/ppkind_test.py diff --git a/viecpro_deduplication/tests/relation_writer_test.py b/dubletten_tool/tests/relation_writer_test.py similarity index 100% rename from viecpro_deduplication/tests/relation_writer_test.py rename to dubletten_tool/tests/relation_writer_test.py diff --git a/viecpro_deduplication/tests/single_merge_test.py b/dubletten_tool/tests/single_merge_test.py similarity index 100% rename from viecpro_deduplication/tests/single_merge_test.py rename to dubletten_tool/tests/single_merge_test.py diff --git a/viecpro_deduplication/tests/temp_rel_test.py b/dubletten_tool/tests/temp_rel_test.py similarity index 88% rename from viecpro_deduplication/tests/temp_rel_test.py rename to dubletten_tool/tests/temp_rel_test.py index 62b9b851..fb8d0e6a 100644 --- a/viecpro_deduplication/tests/temp_rel_test.py +++ b/dubletten_tool/tests/temp_rel_test.py @@ -1,5 +1,5 @@ from django.test import TestCase -from viecpro_deduplication.src.classes import TempRel +from dubletten_tool.src.classes import TempRel class TempRelTest(TestCase): diff --git a/viecpro_deduplication/urls.py b/dubletten_tool/urls.py similarity index 97% rename from viecpro_deduplication/urls.py rename to dubletten_tool/urls.py index c761c58a..1f2601a0 100644 --- a/viecpro_deduplication/urls.py +++ b/dubletten_tool/urls.py @@ -3,7 +3,7 @@ from .views import MergeGroupsView, get_all_notes, getToolPage, getNoteJSON, HandleNoteForm, get_group_suggestions, get_group_ajax, rename_group, update_group_checkboxes, create_new_group, remove_member, get_singles, get_groups, get_single_ajax, get_person_suggestions from .detail_view import OverwrittenGenericEntitiesDetailView from .merge_views import GenericCeleryTaskStatusView, DeleteRelation, GenericEntitiesEditView, GenericEntitiesDetailView, GenericListViewNew, GetRelationEditor, UpdateFieldView, CreateRelationView, RemergeGroupView, UpdateCollectionsView -app_name = "viecpro_deduplication" +app_name = "dubletten_tool" urlpatterns = [ url(r"entity/update_collections", @@ -11,7 +11,7 @@ # handles field updates in tables in relation_editor url(r"entity/update_field", UpdateFieldView.as_view(), name="update_field"), - # Handles re run of merge in viecpro_deduplication + # Handles re run of merge in dubletten_tool url(r"run_remerge/(?P[0-9]+)/", RemergeGroupView.as_view(), name="remerge_group"), # handles creating new relation in dubletten view in relation_editor diff --git a/viecpro_deduplication/views.py b/dubletten_tool/views.py similarity index 100% rename from viecpro_deduplication/views.py rename to dubletten_tool/views.py diff --git a/notebooks/Create Sample 3D CHO.ipynb b/notebooks/Create Sample 3D CHO.ipynb new file mode 100644 index 00000000..363fcab7 --- /dev/null +++ b/notebooks/Create Sample 3D CHO.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/viecpro_deduplication/migrations/0001_initial.py b/viecpro_deduplication/migrations/0001_initial.py deleted file mode 100644 index 18347746..00000000 --- a/viecpro_deduplication/migrations/0001_initial.py +++ /dev/null @@ -1,127 +0,0 @@ -# Generated by Django 3.2.18 on 2023-12-04 11:06 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('apis_entities', '0004_auto_20200722_1231'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='Group', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(blank=True, max_length=600)), - ('status', models.CharField(choices=[('unchecked', 'unchecked'), ('checked group', 'checked group'), ('checked for other groups', 'checked for other groups'), ('checked all members', 'checked all members'), ('ready to merge', 'ready to merge'), ('merged', 'merged')], default='unchecked', max_length=300)), - ('_gender', models.CharField(blank=True, max_length=255, null=True)), - ('marked', models.BooleanField(default=False)), - ('note', models.TextField(blank=True, max_length=2000, null=True)), - ], - options={ - 'db_table': 'dubletten_tool_group', - 'ordering': ['name'], - }, - ), - migrations.CreateModel( - name='PersonProxy', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', models.CharField(choices=[('candidate', 'Candidate'), ('single', 'Single'), ('merged', 'Merged')], default='single', max_length=300)), - ('marked', models.BooleanField(default=False)), - ('note', models.TextField(blank=True, max_length=2000, null=True)), - ('_names', models.JSONField(null=True)), - ('_first_names', models.JSONField(null=True)), - ('person', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='apis_entities.person')), - ], - options={ - 'db_table': 'dubletten_tool_personproxy', - 'ordering': ['person__name'], - }, - ), - migrations.CreateModel( - name='StatusButtonGroupType', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=600)), - ('short', models.CharField(default='BT', max_length=4)), - ], - options={ - 'db_table': 'dubletten_tool_statusbuttongrouptype', - }, - ), - migrations.CreateModel( - name='StatusButtonProxyType', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=600)), - ], - options={ - 'db_table': 'dubletten_tool_statusbuttonproxytype', - }, - ), - migrations.CreateModel( - name='Suggestions', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('data', models.JSONField(blank=True, null=True)), - ], - options={ - 'db_table': 'dubletten_tool_suggestions', - }, - ), - migrations.CreateModel( - name='StatusButtonProxy', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('value', models.BooleanField(default=False)), - ('kind', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_deduplication.statusbuttonproxytype')), - ('related_instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_deduplication.personproxy')), - ], - options={ - 'db_table': 'dubletten_tool_statusbuttonproxy', - }, - ), - migrations.CreateModel( - name='StatusButtonGroup', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('value', models.BooleanField(default=False)), - ('kind', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_deduplication.statusbuttongrouptype')), - ('related_instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_deduplication.group')), - ], - options={ - 'db_table': 'dubletten_tool_statusbuttongroup', - }, - ), - migrations.AddField( - model_name='group', - name='members', - field=models.ManyToManyField(blank=True, to='viecpro_deduplication.PersonProxy'), - ), - migrations.AddField( - model_name='group', - name='vorfin', - field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='merged_group', to='apis_entities.person'), - ), - migrations.CreateModel( - name='DublettenLOG', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('msg', models.TextField(max_length=600)), - ('action', models.CharField(max_length=255)), - ('timestamp', models.DateTimeField(auto_now_add=True)), - ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'dubletten_tool_dublettenlog', - }, - ), - ] diff --git a/viecpro_deduplication/migrations/__init__.py b/viecpro_deduplication/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/viecpro_deduplication/templates/del/ampel_action_template.html b/viecpro_deduplication/templates/del/ampel_action_template.html deleted file mode 100644 index baf2e3cf..00000000 --- a/viecpro_deduplication/templates/del/ampel_action_template.html +++ /dev/null @@ -1,138 +0,0 @@ -
-
-
-
- {% if instance.ampel.note %} - - {% else %} - - {% endif %} -
- - \ No newline at end of file diff --git a/viecpro_deduplication/templates/merge/ampel_action_template.html b/viecpro_deduplication/templates/merge/ampel_action_template.html deleted file mode 100644 index baf2e3cf..00000000 --- a/viecpro_deduplication/templates/merge/ampel_action_template.html +++ /dev/null @@ -1,138 +0,0 @@ -
-
-
-
- {% if instance.ampel.note %} - - {% else %} - - {% endif %} -
- - \ No newline at end of file diff --git a/viecpro_deduplication/templates/tool_page.html b/viecpro_deduplication/templates/tool_page.html deleted file mode 100644 index edf83548..00000000 --- a/viecpro_deduplication/templates/tool_page.html +++ /dev/null @@ -1,1636 +0,0 @@ -{% extends "webpage/base.html" %} -{% load static %} -{% load stats_extras %} -{% load webpage_extras %} - -{% block content %} - - - -
-
-
- - - - - - -
-
-
-
-

Performing manual merge / re-merge...

- -
- -
-
- -
- - -
-
-
-
- -
- -
-
-
- -

Selected

- - -
-
-
- -

Detail / Suggestions

- -
- - -
-
- -
-
-
-
- - - -
- - -
-
- - -
-
- - -
-
- - - {% for b in Buttons %} - {% if forloop.first %} - - {% elif forloop.last %} - - - {% else %} - - - {% endif %} - - {% endfor %} - - - - - - - -
- -
-
-
- - - -
- - -
-
- - -
-
- - -
-
- - - -
- -
    - -
-
-
-
- Not implemented yet -
- -
-
-
-
-

Singles

- -
- - -
-
- -
-
- - - - - - - - - - - - - - - - {% endblock %} \ No newline at end of file diff --git a/viecpro_import/migrations/0001_initial.py b/viecpro_import/migrations/0001_initial.py deleted file mode 100644 index 1d901445..00000000 --- a/viecpro_import/migrations/0001_initial.py +++ /dev/null @@ -1,135 +0,0 @@ -# Generated by Django 3.2.18 on 2023-12-04 11:00 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), - ('apis_vocabularies', '0002_texttype_lang'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('apis_entities', '0004_auto_20200722_1231'), - ('apis_metainfo', '0006_remove_text_lang'), - ] - - operations = [ - migrations.CreateModel( - name='DataSource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), - ('server_directory', models.CharField(max_length=255)), - ('page_count', models.IntegerField(blank=True, null=True)), - ('citation', models.TextField(blank=True, max_length=600, null=True)), - ('year', models.CharField(max_length=10)), - ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'apis_import_project_datasource', - }, - ), - migrations.CreateModel( - name='DataSourcePage', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('page_index', models.IntegerField()), - ('page_token', models.CharField(blank=True, max_length=20, null=True)), - ('DataSource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.datasource')), - ], - options={ - 'db_table': 'apis_import_project_datasourcepage', - }, - ), - migrations.CreateModel( - name='GenericCollectionEntry', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')), - ], - options={ - 'db_table': 'apis_import_project_genericcollectionentry', - }, - ), - migrations.CreateModel( - name='ImportProject', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), - ('description', models.TextField(blank=True, help_text='Describe your project here.', max_length=2000, null=True)), - ('DataSources', models.ManyToManyField(blank=True, help_text='Consider adding existing Datasources uploaded by you to this Project. Or upload/add additional Datasources later.', to='viecpro_import.DataSource')), - ('Editors', models.ManyToManyField(blank=True, help_text='Add users that should be able to edit this project.', related_name='Editors', to=settings.AUTH_USER_MODEL)), - ('collection', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='apis_metainfo.collection')), - ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='owner', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'apis_import_project_importproject', - }, - ), - migrations.CreateModel( - name='PageCollection', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('created_in', models.ManyToManyField(related_name='created', to='viecpro_import.GenericCollectionEntry')), - ('edited_in', models.ManyToManyField(related_name='edited', to='viecpro_import.GenericCollectionEntry')), - ], - options={ - 'db_table': 'apis_import_project_pagecollection', - }, - ), - migrations.CreateModel( - name='ProjectState', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('last_datasource', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='viecpro_import.datasource')), - ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.importproject')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'apis_import_project_projectstate', - }, - ), - migrations.CreateModel( - name='ProjectCollectionEntry', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('json', models.TextField(blank=True)), - ('entry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='last_json', to='viecpro_import.genericcollectionentry')), - ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.importproject')), - ], - options={ - 'db_table': 'apis_import_project_projectcollectionentry', - }, - ), - migrations.CreateModel( - name='PageData', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('collection', models.OneToOneField(auto_created=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='viecpro_import.pagecollection')), - ('function', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='apis_vocabularies.personinstitutionrelation')), - ('institution', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='apis_entities.institution')), - ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.datasourcepage')), - ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.importproject')), - ], - options={ - 'db_table': 'apis_import_project_pagedata', - }, - ), - migrations.CreateModel( - name='DataSourceProjectState', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('datasource', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.datasource')), - ('last_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='viecpro_import.datasourcepage')), - ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='viecpro_import.importproject')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'apis_import_project_datasourceprojectstate', - }, - ), - ] diff --git a/viecpro_import/migrations/__init__.py b/viecpro_import/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/viecpro_import/templates/element_templates/custom_ajax_form_generic.html b/viecpro_import/templates/element_templates/custom_ajax_form_generic.html deleted file mode 100644 index b674a87f..00000000 --- a/viecpro_import/templates/element_templates/custom_ajax_form_generic.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
- {% load crispy_forms_tags %} - {% crispy form form.helper %} -
- -
-
-
\ No newline at end of file diff --git a/webpage/templates/webpage/base.html b/webpage/templates/webpage/base.html index fa3276d9..132d5a10 100644 --- a/webpage/templates/webpage/base.html +++ b/webpage/templates/webpage/base.html @@ -247,7 +247,7 @@ >
- {% endif %} {% if "viecpro_import" in APPS%} + {% endif %} {% if "apis_import_project" in APPS%}
- {% endif %} {% if "viecpro_deduplication" in APPS%} + {% endif %} {% if "dubletten_tool" in APPS%}
@@ -324,7 +324,8 @@ {% endfor %}

- {% if user.is_authenticated and "apis_ampel" in APPS %} + {% if user.is_authenticated and "apis_ampel" in APPS + %}
- {% if user.is_authenticated and "apis_ampel" in APPS - %} + {% if user.is_authenticated and "apis_ampel" in APPS %}