diff options
-rw-r--r-- | Makefile.example | 11 | ||||
-rw-r--r-- | archaeological_finds/migrations/0116_data_migration.json | 1623 | ||||
-rw-r--r-- | archaeological_finds/migrations/0116_data_migration_museum_technical.py | 22 | ||||
-rw-r--r-- | ishtar_common/admin.py | 1 | ||||
-rw-r--r-- | ishtar_common/migrations/0237_data_migration.json | 158 | ||||
-rw-r--r-- | ishtar_common/migrations/0237_data_migration_licenses_shootingangle.py | 22 | ||||
-rw-r--r-- | ishtar_common/tests.py | 3 |
7 files changed, 1837 insertions, 3 deletions
diff --git a/Makefile.example b/Makefile.example index c23b333d5..7d616853e 100644 --- a/Makefile.example +++ b/Makefile.example @@ -216,7 +216,9 @@ fixtures_common: fixtures_common_importers fixtures_geo ishtar_common.documenttemplate \ ishtar_common.geoorigintype \ ishtar_common.geodatatype \ - ishtar_common.geoprovidertype + ishtar_common.geoprovidertype \ + ishtar_common.LicenseType \ + ishtar_common.ShootingAngle \ > '../ishtar_common/fixtures/initial_data-'$(default_data)'.json' fixtures_common_importers: @@ -301,6 +303,13 @@ fixtures_finds: archaeological_finds.checkedtype \ archaeological_finds.treatmentfiletype \ archaeological_finds.checkedtype \ + archaeological_finds.technicalprocesstype \ + archaeological_finds.technicalareatype \ + archaeological_finds.collectionentrymodetype \ + archaeological_finds.inventoryconformity \ + archaeological_finds.markingtype \ + archaeological_finds.originalreproduction \ + archaeological_finds.inventorymarkingpresence \ > '../archaeological_finds/fixtures/initial_data-'$(default_data)'.json' fixtures_warehouse: diff --git a/archaeological_finds/migrations/0116_data_migration.json b/archaeological_finds/migrations/0116_data_migration.json new file mode 100644 index 000000000..933f9374a --- /dev/null +++ b/archaeological_finds/migrations/0116_data_migration.json @@ -0,0 +1,1623 @@ +[ +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Abrasure", + "txt_idx": "abrasure", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Argenture", + "txt_idx": "argenture", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Armure", + "txt_idx": "armure", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Aiguisage", + "txt_idx": "aiguisage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Ajourage", + "txt_idx": "ajourage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Application", + "txt_idx": "application", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Assemblage", + "txt_idx": "assemblage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Calcination", + "txt_idx": "calcination", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Champlev\u00e9", + "txt_idx": "champleve", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Cintrage", + "txt_idx": "cintrage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Ciselure", + "txt_idx": "ciselure", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Cloisonn\u00e9", + "txt_idx": "cloisonne", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Coloration", + "txt_idx": "coloration", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Coulage", + "txt_idx": "coulage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Couture", + "txt_idx": "couture", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Crantage", + "txt_idx": "crantage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Cuisson", + "txt_idx": "cuisson", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Damasquinage", + "txt_idx": "damasquinage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "D\u00e9bitage", + "txt_idx": "debitage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "D\u00e9coupage", + "txt_idx": "decoupage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Dorure", + "txt_idx": "dorure", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Enduisage", + "txt_idx": "enduisage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "\u00c9maillage", + "txt_idx": "emaillage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Engobage", + "txt_idx": "engobage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Estampage", + "txt_idx": "estampage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "\u00c9tamage", + "txt_idx": "etamage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Fa\u00e7onnage", + "txt_idx": "faconnage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Filage", + "txt_idx": "filage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Filigranage", + "txt_idx": "filigranage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Fonte", + "txt_idx": "fonte", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Fonte \u00e0 la cire perdue", + "txt_idx": "fonte-a-la-cire-perdue", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Fonte au sable", + "txt_idx": "fonte-au-sable", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Forgeage", + "txt_idx": "forgeage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Frappage", + "txt_idx": "frappage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Galvanisation", + "txt_idx": "galvanisation", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Galvanoplastie", + "txt_idx": "galvanoplastie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Gla\u00e7ure", + "txt_idx": "glacure", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Gla\u00e7ure plombif\u00e8re", + "txt_idx": "glacure-plombifere", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Granulation", + "txt_idx": "granulation", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Gravure", + "txt_idx": "gravure", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Impression \u00e0 la molette", + "txt_idx": "impression-a-la-molette", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Incision", + "txt_idx": "incision", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Incrustation", + "txt_idx": "incrustation", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Laminage", + "txt_idx": "laminage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Lissage", + "txt_idx": "lissage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Lustrage", + "txt_idx": "lustrage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Marbrage", + "txt_idx": "marbrage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Marouflage", + "txt_idx": "marouflage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Marqueterie", + "txt_idx": "marqueterie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Martelage", + "txt_idx": "martelage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Matage", + "txt_idx": "matage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Modelage", + "txt_idx": "modelage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Moulage", + "txt_idx": "moulage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Niellage", + "txt_idx": "niellage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Patine", + "txt_idx": "patine", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Peinture", + "txt_idx": "peinture", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Percussion", + "txt_idx": "percussion", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Percussion indirecte", + "txt_idx": "percussion-indirecte", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Perforation", + "txt_idx": "perforation", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "P\u00e9trification", + "txt_idx": "petrification", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Piquetage", + "txt_idx": "piquetage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Placage", + "txt_idx": "placage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Poin\u00e7onnage", + "txt_idx": "poinconnage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Polissage", + "txt_idx": "polissage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Raclage", + "txt_idx": "raclage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Repoussage", + "txt_idx": "repoussage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Sciage", + "txt_idx": "sciage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Sculpture", + "txt_idx": "sculpture", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Sigill\u00e9e", + "txt_idx": "sigillee", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Soudage", + "txt_idx": "soudage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Soufflage", + "txt_idx": "soufflage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Taille", + "txt_idx": "taille", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Teinture", + "txt_idx": "teinture", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Tissage", + "txt_idx": "tissage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Tournage", + "txt_idx": "tournage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Tressage", + "txt_idx": "tressage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Vernissage", + "txt_idx": "vernissage", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalprocesstype", + "fields": { + "label": "Vitrification", + "txt_idx": "vitrification", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Horlogerie", + "txt_idx": "horlogerie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Huisserie", + "txt_idx": "huisserie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Industrie lithique", + "txt_idx": "industrie-lithique", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Joaillerie", + "txt_idx": "joaillerie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Maroquinerie", + "txt_idx": "maroquinerie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Orf\u00e8vrerie", + "txt_idx": "orfevrerie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Tabletterie", + "txt_idx": "tabletterie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.technicalareatype", + "fields": { + "label": "Vannerie", + "txt_idx": "vannerie", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat", + "txt_idx": "achat", + "comment": "", + "available": true, + "order": 10, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Affectation", + "txt_idx": "affectation", + "comment": "", + "available": true, + "order": 20, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Ancien fonds", + "txt_idx": "ancien-fonds", + "comment": "", + "available": true, + "order": 30, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Attribution par l'office des biens priv\u00e9s", + "txt_idx": "attribution-par-loffice-des-biens-prives", + "comment": "", + "available": true, + "order": 40, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Cession", + "txt_idx": "cession", + "comment": "", + "available": true, + "order": 50, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Changement d'affectation", + "txt_idx": "changement-daffectation", + "comment": "", + "available": true, + "order": 60, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Dation", + "txt_idx": "dation", + "comment": "", + "available": true, + "order": 70, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "D\u00e9p\u00f4t", + "txt_idx": "depot", + "comment": "", + "available": true, + "order": 80, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "D\u00e9volution", + "txt_idx": "devolution", + "comment": "", + "available": true, + "order": 90, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Donation", + "txt_idx": "donation", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "\u00c9change", + "txt_idx": "echange", + "comment": "", + "available": true, + "order": 110, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Legs", + "txt_idx": "legs", + "comment": "", + "available": true, + "order": 120, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Mode d'acquisition inconnu", + "txt_idx": "mode-dacquisition-inconnu", + "comment": "", + "available": true, + "order": 130, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Mode d'acquisition non renseign\u00e9", + "txt_idx": "mode-dacquisition-non-renseigne", + "comment": "", + "available": true, + "order": 140, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Partage de fouilles", + "txt_idx": "partage-de-fouilles", + "comment": "", + "available": true, + "order": 150, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Saisie", + "txt_idx": "saisie", + "comment": "", + "available": true, + "order": 160, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Transfert de propri\u00e9t\u00e9 de l'etat \u00e0 titre gratuit", + "txt_idx": "transfert-de-propriete-de-letat-a-titre-gratuit", + "comment": "", + "available": true, + "order": 170, + "parent": null + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat apr\u00e8s arr\u00eat en douane", + "txt_idx": "achat-apres-arret-en-douane", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat apr\u00e8s commande", + "txt_idx": "achat-apres-commande", + "comment": "", + "available": true, + "order": 20, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat apr\u00e8s fouilles", + "txt_idx": "achat-apres-fouilles", + "comment": "", + "available": true, + "order": 30, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat au salon", + "txt_idx": "achat-au-salon", + "comment": "", + "available": true, + "order": 40, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat avec participation", + "txt_idx": "achat-avec-participation", + "comment": "", + "available": true, + "order": 50, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat en vente publique", + "txt_idx": "achat-en-vente-publique", + "comment": "", + "available": true, + "order": 60, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat par pr\u00e9emption", + "txt_idx": "achat-par-preemption", + "comment": "", + "available": true, + "order": 70, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat sous r\u00e9serve d'usufruit", + "txt_idx": "achat-sous-reserve-dusufruit", + "comment": "", + "available": true, + "order": 80, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat sur les arr\u00e9rages d'une donation", + "txt_idx": "achat-sur-les-arrerages-dune-donation", + "comment": "", + "available": true, + "order": 90, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat sur les arr\u00e9rages d'une fondation", + "txt_idx": "achat-sur-les-arrerages-dune-fondation", + "comment": "", + "available": true, + "order": 100, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat sur les arr\u00e9rages d'un legs", + "txt_idx": "achat-sur-les-arrerages-dun-legs", + "comment": "", + "available": true, + "order": 110, + "parent": [ + "achat" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Cession \u00e0 titre gratuit", + "txt_idx": "cession-a-titre-gratuit", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "cession" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Don", + "txt_idx": "don", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "donation" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Donation sous r\u00e9serve d'usufruit", + "txt_idx": "donation-sous-reserve-dusufruit", + "comment": "", + "available": true, + "order": 20, + "parent": [ + "donation" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Don apr\u00e8s fouilles", + "txt_idx": "don-apres-fouilles", + "comment": "", + "available": true, + "order": 30, + "parent": [ + "donation" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Legs sous r\u00e9serve d'usufruit", + "txt_idx": "legs-sous-reserve-dusufruit", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "legs" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Conqu\u00eate militaire", + "txt_idx": "conquete-militaire", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "saisie" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Saisie en douane", + "txt_idx": "saisie-en-douane", + "comment": "", + "available": true, + "order": 20, + "parent": [ + "saisie" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Saisie r\u00e9volutionnaire", + "txt_idx": "saisie-revolutionnaire", + "comment": "", + "available": true, + "order": 30, + "parent": [ + "saisie" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Saisie napol\u00e9onienne", + "txt_idx": "saisie-napoleonienne", + "comment": "", + "available": true, + "order": 40, + "parent": [ + "saisie" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "S\u00e9questre", + "txt_idx": "sequestre", + "comment": "", + "available": true, + "order": 50, + "parent": [ + "saisie" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat avec participation d'association", + "txt_idx": "achat-avec-participation-dassociation", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "achat-avec-participation" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat avec participation du fonds national du patrimoine", + "txt_idx": "achat-avec-participation-du-fonds-national-du-patrimoine", + "comment": "", + "available": true, + "order": 20, + "parent": [ + "achat-avec-participation" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat avec participation du fram", + "txt_idx": "achat-avec-participation-du-fram", + "comment": "", + "available": true, + "order": 30, + "parent": [ + "achat-avec-participation" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat par pr\u00e9emption en douane", + "txt_idx": "achat-par-preemption-en-douane", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "achat-par-preemption" + ] + } +}, +{ + "model": "archaeological_finds.collectionentrymodetype", + "fields": { + "label": "Achat par pr\u00e9emption en vente publique", + "txt_idx": "achat-par-preemption-en-vente-publique", + "comment": "", + "available": true, + "order": 20, + "parent": [ + "achat-par-preemption" + ] + } +}, +{ + "model": "archaeological_finds.inventoryconformity", + "fields": { + "label": "Oui", + "txt_idx": "oui", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "archaeological_finds.inventoryconformity", + "fields": { + "label": "Non", + "txt_idx": "non", + "comment": "", + "available": true, + "order": 20 + } +}, +{ + "model": "archaeological_finds.inventoryconformity", + "fields": { + "label": "Autre", + "txt_idx": "autre", + "comment": "", + "available": true, + "order": 30 + } +}, +{ + "model": "archaeological_finds.inventoryconformity", + "fields": { + "label": "Inconnue", + "txt_idx": "inconnue", + "comment": "", + "available": true, + "order": 40 + } +}, +{ + "model": "archaeological_finds.markingtype", + "fields": { + "label": "Marqu\u00e9 sur l'objet", + "txt_idx": "marque-sur-lobjet", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "archaeological_finds.markingtype", + "fields": { + "label": "Marqu\u00e9 sur \u00e9tiquette", + "txt_idx": "marque-sur-etiquette", + "comment": "", + "available": true, + "order": 20 + } +}, +{ + "model": "archaeological_finds.markingtype", + "fields": { + "label": "Marqu\u00e9 sur autre support (conditionnement)", + "txt_idx": "marque-sur-autre-support-conditionnement", + "comment": "", + "available": true, + "order": 30 + } +}, +{ + "model": "archaeological_finds.markingtype", + "fields": { + "label": "Marquage erron\u00e9, effac\u00e9, illisible, inaccessible", + "txt_idx": "marquage-errone-efface-illisible-inaccessible", + "comment": "", + "available": true, + "order": 40 + } +}, +{ + "model": "archaeological_finds.markingtype", + "fields": { + "label": "\u00c0 marquer", + "txt_idx": "a-marquer", + "comment": "", + "available": true, + "order": 50 + } +}, +{ + "model": "archaeological_finds.originalreproduction", + "fields": { + "label": "Original", + "txt_idx": "original", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "archaeological_finds.originalreproduction", + "fields": { + "label": "Reproduction", + "txt_idx": "reproduction", + "comment": "", + "available": true, + "order": 20 + } +}, +{ + "model": "archaeological_finds.originalreproduction", + "fields": { + "label": "Reproduction \u00e0 valeur d\u2019original", + "txt_idx": "reproduction-a-valeur-doriginal", + "comment": "", + "available": true, + "order": 30 + } +}, +{ + "model": "archaeological_finds.inventorymarkingpresence", + "fields": { + "label": "Oui", + "txt_idx": "oui", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "archaeological_finds.inventorymarkingpresence", + "fields": { + "label": "Autre (n\u00b0 autre que l'inventaire)", + "txt_idx": "autre", + "comment": "", + "available": true, + "order": 20 + } +}, +{ + "model": "archaeological_finds.inventorymarkingpresence", + "fields": { + "label": "Non", + "txt_idx": "non", + "comment": "", + "available": true, + "order": 30 + } +} +] diff --git a/archaeological_finds/migrations/0116_data_migration_museum_technical.py b/archaeological_finds/migrations/0116_data_migration_museum_technical.py new file mode 100644 index 000000000..3aed88be8 --- /dev/null +++ b/archaeological_finds/migrations/0116_data_migration_museum_technical.py @@ -0,0 +1,22 @@ +# Generated by Django 2.2.24 on 2024-02-10 12:29 + +import os + +from django.db import migrations +from django.core.management import call_command + + +def load_data(_, __): + json_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1] + ["0116_data_migration.json"]) + call_command("loaddata", json_path) + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0115_auto_20240209_1745'), + ] + + operations = [ + migrations.RunPython(load_data) + ] diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py index 7cd336ebf..da35fe48c 100644 --- a/ishtar_common/admin.py +++ b/ishtar_common/admin.py @@ -2035,7 +2035,6 @@ class ImportColumnValue(admin.ModelAdmin): list_display = ("import_item", "column") - class JsonContentTypeFormMixin(object): class Meta: model = models.JsonDataSection diff --git a/ishtar_common/migrations/0237_data_migration.json b/ishtar_common/migrations/0237_data_migration.json new file mode 100644 index 000000000..90511ee81 --- /dev/null +++ b/ishtar_common/migrations/0237_data_migration.json @@ -0,0 +1,158 @@ +[ +{ + "model": "ishtar_common.licensetype", + "fields": { + "label": "Usage interne / non communicable", + "txt_idx": "usage-interne-non-communicable", + "comment": "", + "available": true, + "order": 10, + "parent": null, + "url": null + } +}, +{ + "model": "ishtar_common.licensetype", + "fields": { + "label": "Tous droits r\u00e9serv\u00e9s", + "txt_idx": "tous-droits-reserves", + "comment": "", + "available": true, + "order": 20, + "parent": null, + "url": null + } +}, +{ + "model": "ishtar_common.licensetype", + "fields": { + "label": "CC-by-sa", + "txt_idx": "cc-by-sa", + "comment": "", + "available": true, + "order": 30, + "parent": null, + "url": null + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Z\u00e9nithal", + "txt_idx": "zenithal", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Oblique", + "txt_idx": "oblique", + "comment": "", + "available": true, + "order": 20 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le nord", + "txt_idx": "depuis-le-nord", + "comment": "", + "available": true, + "order": 30 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis l\u2019ouest", + "txt_idx": "depuis-louest", + "comment": "", + "available": true, + "order": 40 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis l\u2019est", + "txt_idx": "depuis-lest", + "comment": "", + "available": true, + "order": 50 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le sud", + "txt_idx": "depuis-le-sud", + "comment": "", + "available": true, + "order": 60 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le nord-ouest", + "txt_idx": "depuis-le-nord-ouest", + "comment": "", + "available": true, + "order": 70 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le nord-est", + "txt_idx": "depuis-le-nord-est", + "comment": "", + "available": true, + "order": 80 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le sud-ouest", + "txt_idx": "depuis-le-sud-ouest", + "comment": "", + "available": true, + "order": 90 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le sud-est", + "txt_idx": "depuis-le-sud-est", + "comment": "", + "available": true, + "order": 100 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Recto / face", + "txt_idx": "recto-face", + "comment": "", + "available": true, + "order": 110 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Verso / revers", + "txt_idx": "verso-revers", + "comment": "", + "available": true, + "order": 120 + } +} +] diff --git a/ishtar_common/migrations/0237_data_migration_licenses_shootingangle.py b/ishtar_common/migrations/0237_data_migration_licenses_shootingangle.py new file mode 100644 index 000000000..ec25de658 --- /dev/null +++ b/ishtar_common/migrations/0237_data_migration_licenses_shootingangle.py @@ -0,0 +1,22 @@ +# Generated by Django 2.2.24 on 2024-02-10 12:07 + +import os + +from django.db import migrations +from django.core.management import call_command + + +def load_data(_, __): + json_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1] + ["0237_data_migration.json"]) + call_command("loaddata", json_path) + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0236_auto_20240209_1558'), + ] + + operations = [ + migrations.RunPython(load_data) + ] diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 6a2e9d3b0..858692966 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -819,8 +819,9 @@ class SerializationTest(GenericSerializationTest, TestCase): fixtures = COMMON_FIXTURES + WAREHOUSE_FIXTURES def create_types(self): + # create default when no data is provided for app, model_name in ( - ("ishtar_common", "LicenseType"), + ("archaeological_finds", "MuseumCollection"), ("archaeological_finds", "MaterialTypeQualityType"), ("archaeological_finds", "ObjectTypeQualityType"), ("archaeological_finds", "AlterationType"), |