diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-22 13:41:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-22 13:41:02 +0200 |
commit | dafc5d16f3095bad00356b6198afcd5bbeab61d6 (patch) | |
tree | 7040d1fd325ba67b890122059a8f50a3857e332a /archaeological_warehouse/models.py | |
parent | 64bb69c03ce1688c72b3f7ebd0e1550cd941aa69 (diff) | |
parent | 0ecd905165193897129a71a1e8203232f0b2b68c (diff) | |
download | Ishtar-dafc5d16f3095bad00356b6198afcd5bbeab61d6.tar.bz2 Ishtar-dafc5d16f3095bad00356b6198afcd5bbeab61d6.zip |
Merge branch 'master' into v0.9
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")) |