diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-11-20 12:28:10 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-11-20 12:28:10 +0100 | 
| commit | 1e428c411afbd2d0c4e1480abcf5a89cdac761b1 (patch) | |
| tree | c2470281db529a89dc9a7a071d94437502b5e80b /archaeological_operations/models.py | |
| parent | 0e2bf2e4f149c1250b2aef2c4f94c09db07b5584 (diff) | |
| download | Ishtar-1e428c411afbd2d0c4e1480abcf5a89cdac761b1.tar.bz2 Ishtar-1e428c411afbd2d0c4e1480abcf5a89cdac761b1.zip | |
Archaeological operations: add virtual and record quality fields (refs #2961)
Diffstat (limited to 'archaeological_operations/models.py')
| -rw-r--r-- | archaeological_operations/models.py | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 7565c8288..5f5369e8b 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -114,9 +114,14 @@ def get_values_town_related(item, prefix, values):                      number=dpt).count()])      return values +QUALITY = (('ND', _(u"Not documented")), +           ('A', _(u"Arbitrary")), +           ('R', _(u"Reliable")),) +  class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem,                  DashboardFormItem): +    QUALITY_DICT = dict(QUALITY)      TABLE_COLS = ['year_index', 'operation_type', 'remains', 'towns',                    'start_date', 'excavation_end_date']      if FILES_AVAILABLE: @@ -206,6 +211,14 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem,      archaeological_sites = models.ManyToManyField(          ArchaeologicalSite, verbose_name=_(u"Archaeological sites"),          null=True, blank=True) +    virtual_operation = models.BooleanField( +        _(u"Virtual operation"), +        default=False, help_text=_( +            u"If checked, it means that this operation have not been " +            u"officialy registered.")) +    record_quality = models.CharField( +        _(u"Record quality"), max_length=2, null=True, blank=True, +        choices=QUALITY)      history = HistoricalRecords()      class Meta: | 
