diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-05 20:14:01 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-05 20:14:01 +0200 |
| commit | 8c33886e7f24deb1623e82e0792af9923899f7ad (patch) | |
| tree | 101144fad0e35a101edac31910ccea67c88a3963 /archaeological_finds/models.py | |
| parent | 2ff9087dd0a1c93be556a1267519ce1c9accc732 (diff) | |
| parent | 7f8be42cf5cea041bede638d355a8de0d0f97dbf (diff) | |
| download | Ishtar-8c33886e7f24deb1623e82e0792af9923899f7ad.tar.bz2 Ishtar-8c33886e7f24deb1623e82e0792af9923899f7ad.zip | |
Merge branch 'v0.9' into wheezy
Diffstat (limited to 'archaeological_finds/models.py')
| -rw-r--r-- | archaeological_finds/models.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index 70e0156fc..15ed32120 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -280,7 +280,9 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): 'base_finds.context_record.operation.year', 'base_finds.context_record.operation.operation_code', 'container.reference', 'container.location', - 'base_finds.batch'] + 'base_finds.batch', + 'base_finds.context_record.parcel.town', + 'base_finds.context_record.parcel', ] if settings.COUNTRY == 'fr': TABLE_COLS.insert( 6, 'base_finds.context_record.operation.code_patriarche') @@ -289,7 +291,9 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): 'base_finds.cache_complete_id', 'previous_id', 'label', 'material_types', 'datings.period', 'find_number', 'object_types', - 'description'] + 'description', + 'base_finds.context_record.parcel.town', + 'base_finds.context_record.parcel', ] EXTRA_FULL_FIELDS = [ 'base_finds.cache_short_id', 'base_finds.cache_complete_id', @@ -372,13 +376,7 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): null=True) history = HistoricalRecords() BASKET_MODEL = FindBasket - - def __init__(self, *args, **kwargs): - super(Find, self).__init__(*args, **kwargs) - image = self._meta.get_field_by_name("image")[0] - image.upload_to = "finds/" - thumbnail = self._meta.get_field_by_name("thumbnail")[0] - thumbnail.upload_to = "finds/thumbs/" + IMAGE_PREFIX = 'finds/' class Meta: verbose_name = _(u"Find") |
