allow good search

This commit is contained in:
Sanj 2012-04-22 16:23:27 +05:30
parent dad1e8274d
commit 6b6fba059e

View File

@ -177,6 +177,7 @@ def shipList(request):
flag = request.GET.get('flag', None)
owner = request.GET.get('owner', None)
port = request.GET.get('port', None)
goods = request.GET.get('goods', None)
# country = request.GET.get('country', None)
qset = Ship.objects.all()
#add dates stuff
@ -192,6 +193,8 @@ def shipList(request):
qset = qset.filter(owner_trans__icontains=owner)
if port:
qset = qset.filter(port__icontains=port)
if goods:
qset = qset.filter(good__description_string_trans__icontains=goods)
# if country:
# qset = qset.filter(country__icontains=country)
paginator = Paginator(qset, page_size)