diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-21 11:12:47 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-21 11:12:47 +0200 |
commit | f3bc312eccb7b03824915f7fd2918a0d247d90d8 (patch) | |
tree | 2b16e28b04695fa01e1fee0fad14c66cfbe6a526 /archaeological_warehouse/models.py | |
parent | 461e0320a8426fe82c4f6a7fd9cfa376c767fbdd (diff) | |
download | Ishtar-f3bc312eccb7b03824915f7fd2918a0d247d90d8.tar.bz2 Ishtar-f3bc312eccb7b03824915f7fd2918a0d247d90d8.zip |
Manage export with importer's templates (refs #3064)
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 17495bf72..389cc4f5a 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -75,6 +75,15 @@ post_delete.connect(post_save_cache, sender=ContainerType) class Container(LightHistorizedItem): TABLE_COLS = ['reference', 'container_type', 'location'] + + # search parameters + EXTRA_REQUEST_KEYS = { + 'location': 'location__pk', + 'container_type': 'container_type__pk', + 'reference': 'reference__icontains', + } + + # fields location = models.ForeignKey(Warehouse, verbose_name=_(u"Warehouse")) container_type = models.ForeignKey(ContainerType, verbose_name=_("Container type")) |