diff options
-rw-r--r-- | archaeological_context_records/models.py | 8 | ||||
-rw-r--r-- | archaeological_files/models.py | 4 | ||||
-rw-r--r-- | archaeological_finds/models_finds.py | 6 | ||||
-rw-r--r-- | archaeological_finds/models_treatments.py | 10 | ||||
-rw-r--r-- | archaeological_operations/models.py | 11 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 9 | ||||
-rw-r--r-- | ishtar_common/models.py | 3 |
7 files changed, 27 insertions, 24 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index b3e4be9f0..474d71e7c 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -36,7 +36,8 @@ from ishtar_common.models import Document, GeneralType, \ GeneralRelationType, GeneralRecordRelations, post_delete_record_relation,\ post_save_cache, ValueGetter, BulkUpdatedItem, \ RelationItem, Town, get_current_profile, document_attached_changed, \ - HistoryModel, SearchAltName, GeoItem, QRCodeItem, SearchVectorConfig + HistoryModel, SearchAltName, GeoItem, QRCodeItem, SearchVectorConfig, \ + DocumentItem from archaeological_operations.models import Operation, Period, Parcel, \ ArchaeologicalSite @@ -270,8 +271,9 @@ class CRBulkView(object): """ -class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, QRCodeItem, GeoItem, - OwnPerms, ValueGetter, ShortMenuItem, RelationItem): +class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, + QRCodeItem, GeoItem, OwnPerms, ValueGetter, ShortMenuItem, + RelationItem): SLUG = 'contextrecord' APP = "archaeological-context-records" MODEL = "context-record" diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 7d86bcff8..e8df6cdae 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -33,7 +33,7 @@ from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, OwnPerms, Person, Organization, Department, Town, \ Dashboard, DashboardFormItem, ValueGetter, ShortMenuItem, \ OperationType, get_external_id, post_save_cache, Document, HistoryModel, \ - SearchAltName, SearchVectorConfig + SearchAltName, SearchVectorConfig, DocumentItem from archaeological_operations.models import get_values_town_related, \ ClosedItem @@ -82,7 +82,7 @@ if settings.COUNTRY == 'fr': post_delete.connect(post_save_cache, sender=SaisineType) -class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, +class File(ClosedItem, DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem, DashboardFormItem): SLUG = 'file' SHOW_URL = 'show-file' diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 5bffe9851..ad8beb623 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -42,7 +42,7 @@ from ishtar_common.models import Document, GeneralType, \ ValueGetter, get_current_profile, IshtarSiteProfile, PRIVATE_FIELDS, \ GeoItem, BulkUpdatedItem, QuickAction, \ MainItem, document_attached_changed, HistoryModel, DynamicRequest, \ - SearchAltName, QRCodeItem, SearchVectorConfig + SearchAltName, QRCodeItem, SearchVectorConfig, DocumentItem from archaeological_operations.models import AdministrativeAct, Operation @@ -734,8 +734,8 @@ def query_loan(is_true=True): container_ref=F('container')), None, None -class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, QRCodeItem, - OwnPerms, MainItem): +class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem, + QRCodeItem, OwnPerms, MainItem): SLUG = 'find' APP = "archaeological-finds" MODEL = "find" diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index c35d3710c..512fd8a05 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -38,7 +38,7 @@ from ishtar_common.models import Document, GeneralType, \ ImageModel, BaseHistorizedItem, OwnPerms, HistoricalRecords, Person, \ Organization, ValueGetter, post_save_cache, ShortMenuItem, \ DashboardFormItem, document_attached_changed, \ - HistoryModel, SearchAltName, SearchVectorConfig + HistoryModel, SearchAltName, SearchVectorConfig, DocumentItem from ishtar_common.utils import cached_label_changed, get_current_year, \ update_data, m2m_historization_changed @@ -64,8 +64,8 @@ post_save.connect(post_save_cache, sender=TreatmentState) post_delete.connect(post_save_cache, sender=TreatmentState) -class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, - ImageModel, OwnPerms, ShortMenuItem): +class Treatment(DashboardFormItem, ValueGetter, DocumentItem, + BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): SLUG = 'treatment' SHOW_URL = 'show-treatment' TABLE_COLS = ('year', 'index', 'treatment_types__label', @@ -872,8 +872,8 @@ post_save.connect(post_save_cache, sender=TreatmentFileType) post_delete.connect(post_save_cache, sender=TreatmentFileType) -class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, - OwnPerms, ValueGetter, ShortMenuItem): +class TreatmentFile(DashboardFormItem, ClosedItem, DocumentItem, + BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem): SLUG = 'treatmentfile' SHOW_URL = 'show-treatmentfile' TABLE_COLS = ['type', 'year', 'index', 'internal_reference', 'name'] diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 9ab3b317b..5ab7dffbc 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -39,7 +39,7 @@ from ishtar_common.models import BaseHistorizedItem, Dashboard, \ post_delete_record_relation, post_save_cache, RelationItem, \ ShortMenuItem, SourceType, Town, ValueGetter, get_current_profile, \ document_attached_changed, HistoryModel, SearchAltName, \ - GeoItem, QRCodeItem, SearchVectorConfig + GeoItem, QRCodeItem, SearchVectorConfig, DocumentItem from ishtar_common.utils import cached_label_changed, \ force_cached_label_changed, mode, m2m_historization_changed, post_save_geo @@ -107,8 +107,8 @@ post_save.connect(post_save_cache, sender=RecordQualityType) post_delete.connect(post_save_cache, sender=RecordQualityType) -class ArchaeologicalSite(BaseHistorizedItem, QRCodeItem, GeoItem, OwnPerms, - ValueGetter, ShortMenuItem): +class ArchaeologicalSite(DocumentItem, BaseHistorizedItem, QRCodeItem, + GeoItem, OwnPerms, ValueGetter, ShortMenuItem): SLUG = 'site' APP = "archaeological-operations" MODEL = "archaeological-site" @@ -515,8 +515,9 @@ class OperationManager(models.GeoManager): return self.get(code_patriarche=txt_idx) -class Operation(ClosedItem, BaseHistorizedItem, QRCodeItem, GeoItem, OwnPerms,\ - ValueGetter, ShortMenuItem, DashboardFormItem, RelationItem): +class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, + GeoItem, OwnPerms, ValueGetter, ShortMenuItem, + DashboardFormItem, RelationItem): SLUG = 'operation' APP = "archaeological-operations" MODEL = "operation" diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 10cf89943..9783682a9 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -33,7 +33,7 @@ from ishtar_common.models import Document, GeneralType, get_external_id, \ LightHistorizedItem, OwnPerms, Address, Person, post_save_cache, \ DashboardFormItem, ShortMenuItem, \ document_attached_changed, SearchAltName, DynamicRequest, GeoItem, \ - QRCodeItem, SearchVectorConfig + QRCodeItem, SearchVectorConfig, DocumentItem from ishtar_common.utils import cached_label_changed, post_save_geo @@ -48,8 +48,8 @@ post_save.connect(post_save_cache, sender=WarehouseType) post_delete.connect(post_save_cache, sender=WarehouseType) -class Warehouse(Address, GeoItem, QRCodeItem, DashboardFormItem, OwnPerms, - ShortMenuItem): +class Warehouse(Address, DocumentItem, GeoItem, QRCodeItem, DashboardFormItem, + OwnPerms, ShortMenuItem): SLUG = 'warehouse' APP = "archaeological-warehouse" MODEL = "warehouse" @@ -331,7 +331,8 @@ post_save.connect(post_save_cache, sender=ContainerType) post_delete.connect(post_save_cache, sender=ContainerType) -class Container(LightHistorizedItem, QRCodeItem, GeoItem, OwnPerms): +class Container(DocumentItem, LightHistorizedItem, QRCodeItem, GeoItem, + OwnPerms): SLUG = 'container' APP = "archaeological-warehouse" MODEL = "container" diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 67e6f5371..521a3239e 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1846,8 +1846,7 @@ class GeoItem(models.Model): return self._geojson_serialize('multi_polygon') -class BaseHistorizedItem(DocumentItem, FullSearch, Imported, JsonData, - FixAssociated): +class BaseHistorizedItem(FullSearch, Imported, JsonData, FixAssociated): """ Historized item with external ID management. All historized items are searchable and have a data json field. |