diff options
Diffstat (limited to 'example_project')
| -rw-r--r-- | example_project/local_settings_nantes.py | 122 | ||||
| -rw-r--r-- | example_project/settings.py | 26 | 
2 files changed, 138 insertions, 10 deletions
| diff --git a/example_project/local_settings_nantes.py b/example_project/local_settings_nantes.py new file mode 100644 index 000000000..4ade697b4 --- /dev/null +++ b/example_project/local_settings_nantes.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# DB key: (txt_idx, (key, label)) +ISHTAR_OPE_TYPES = { +    (u'préventive', u'BAT'):(u'building_study', +                             u"Étude de bâti (préventif)"), +    (u'programmée', u'BAT'):(u'building_study_research', +                             u"Étude de bâti (programmé)"), +    (u'préventive', u'DIAG'):(u'arch_diagnostic', +                              u"Diagnostic archéologique (préventif)"), +    (u'programmée', u'DIAG'):(u'arch_diagnostic_research', +                              u"Diagnostic archéologique (programmé)"), +    (u'préventive', u'ED'):(u'documents_study', +                            u'Étude documentaire (préventif)'), +    (u'programmée', u'ED'):(u'documents_study_research', +                            u'Étude documentaire (programmé)'), +    (u'préventive', u'EV'):(u'evaluation', +                            u'Évaluation'), +    (u'préventive', u'Fo. Prév.'):(u'prev_excavation', +                                   u"Fouille archéologique préventive"), +    (u'préventive', u'FO'):(u'prev_excavation', +                            u"Fouille archéologique préventive"), +    (u'programmée', u'FO'):(u'prog_excavation', +                            u"Fouille archéologique programmée"), +    (u'programmée', u'FP'):(u'prog_excavation', +                            u"Fouille archéologique programmée"), +    (u'programmée', u'FPP'):(u'prog_excavation', +                             u"Fouille archéologique programmée pluriannuelle"), +    (u'programmée', u'PA'):(u'aerial_survey_research', +                            u"Prospection aérienne (programmée)"), +    (u'préventive', u'PA'):(u'aerial_survey', +                            u"Prospection aérienne (préventif)"), +    (u'programmée', u'PCR'):(u"collective_research_project", +                             u"Projet Collectif de Recherche"), +    (u'programmée', u'PI'):(u'inventory_survey_research', +                            u"Prospection inventaire (programmé)"), +    (u'préventive', u'PI'):(u'inventory_survey', +                            u"Prospection inventaire (préventif)"), +    (u'programmée', u'PR'):(u'survey_research', +                            u"Prospection (programmé)"), +    (u'préventive', u'PR'):(u'survey', +                            u"Prospection (préventif)"), +    (u'programmée', u'PT'):(u'thematic_survey', +                            u"Prospection thématique"), +    (u'programmée', u'RE'):(u'rock_art_survey', +                            u"Prospection avec relevé d'art rupestre"), +    (u'préventive', u'SD'):(u'sampling', +                            u"Sondage (programmé)"), +    (u'programmée', u'SD'):(u'sampling_research', +                            u"Sondage (préventif)"), +    (u'préventive', u'SP'):(u'prev_excavation', +                            u"Fouille archéologique préventive"), +    (u'préventive', u'SU'):(u'emergency_excavation', +                            u"Sauvetage urgent"), +} + +ISHTAR_PERIODS = { +    u'MA':u'middle_age', +    u'IND':u'indetermined', +    u'CON':u'contemporan', +    u'MOD':u'modern', +    u'REC':u'recent_times', +    u'BMA':u'low_middle_age', +    u'MAC':u'classic_middle_age', +    u'HMA':u'high_middle_age', +    u'BAS':u'low_empire', +    u'HAU':u'high-empire', +    u'NRE':u'republic', +    u'GAL':u'gallo-roman', +    u'FE2':u'second_iron_age', +    u'FE1':u'first_iron_age', +    u'BRF':u'final_bronze_age', +    u'BRM':u'middle_bronze_age', +    u'BRA':u'old_bronze_age', +    u'FER':u'iron_age', +    u'BRO':u'bronze_age', +    u'PRO':u'protohistory', +    u'NEF':u'final_neolithic', +    u'NER':u'recent_neolithic', +    u'NEM':u'middle_neolithic', +    u'NEA':u'old_neolithic', +    u'NEO':u'neolithic', +    u'MER':u'recent_mesolithic', +    u'MEM':u'middle_mesolithic', +    u'MEA':u'old_mesolithic', +    u'MES':u'mesolithic', +    u'PAF':u'final_paleolithic', +    u'PAS':u'late_paleolithic', +    u'PAM':u'middle_paleolithic', +    u'PAA':u'ancien_paleolithic', +    u'PAL':u'paleolithic', +    u'':u'not_yet_documented', +} + +# attrs, convert, relative col number +ISHTAR_OPE_COL_FORMAT = [ + [], # pass + [], # pass + (('year',), 'parse_year', []), + (('towns',), 'parse_insee', []), + (('common_name',), 'parse_multivalue', []), # TODO "INTITULE OPE / Faire concat avec NOM du SITE pour l'instant" + [], # TODO "Adresse du SITE = Titre rapport SI VIDE prendre INTITULE / Attention multivaluée de Nom du site, lieu dit et Adresse"; + [], # prog/prev + [], #(('in_charge', 'attached_to', 'name'), 'parse_orga', []), + [], #(('in_charge', 'name'), 'parse_person', []), + [], #(('in_charge' num + (('in_charge',), 'parse_person', [8, 9]), + (('operation_code',), 'parse_operation_code', []), # num ope non patriarche + (('start_date__year',), int, []), + (('excavation_end_date__year',), int, []), + (('start_date__day',), int, []), + (('excavation_end_date__day',), int, []), + (('start_date__month',), int, []), + (('excavation_end_date__month',), int, []), + (('operation_type',), 'parse_operationtype', [6]), + [], + [], + [], + [('code_patriarche',), 'parse_patriarche', []] +] + diff --git a/example_project/settings.py b/example_project/settings.py index d30219452..febed6a61 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -4,14 +4,6 @@  import os -# Ishtar custom -SRID = 27572 -ENCODING = 'windows-1252' -APP_NAME = "SRA - Pays de la Loire" -SURFACE_UNIT = 'square-metre' -SURFACE_UNIT_LABEL = u'm²' -JOINT = u" - " -  ROOT_PATH = os.path.abspath(os.path.curdir) + os.path.sep  STATIC_URL = '/static/'  STATIC_ROOT = ROOT_PATH + 'static/' @@ -23,9 +15,8 @@ XHTML2ODT_PATH = ROOT_PATH + "../xhtml2odt"  ODT_TEMPLATE = ROOT_PATH + "../static/template.odt"  LOGIN_REDIRECT_URL = "/" + URL_PATH -DEBUG = True +DEBUG = 1  TEMPLATE_DEBUG = DEBUG -TEST_RUNNER='django.contrib.gis.tests.run_tests'  AUTH_PROFILE_MODULE = 'ishtar_common.IshtarUser' @@ -154,6 +145,21 @@ LOGGING = {'version': 1,      },  } +# Ishtar custom +SRID = 27572 +ENCODING = 'windows-1252' +APP_NAME = "SRA - Pays de la Loire" +SURFACE_UNIT = 'square-metre' +SURFACE_UNIT_LABEL = u'm²' +JOINT = u" - " +ISHTAR_OPE_COL_FORMAT = None +# DB key: (txt_idx, label) +ISHTAR_OPE_TYPES = {} +# DB key: txt_idx +ISHTAR_PERIODS = {} + +EXTRA_APPS = [] +  try:      from local_settings import *  except ImportError, e: | 
