Add RG in the search popup. Change to use Django Q object. fixed issue #1355. Commit ready for merge
- Legacy-Id: 8617
This commit is contained in:
parent
f5a0cd00da
commit
136bce88b4
|
@ -8,6 +8,8 @@ from django.http import HttpResponseRedirect, Http404
|
|||
from django.shortcuts import render_to_response as render
|
||||
from django.template import RequestContext
|
||||
from django.conf import settings
|
||||
from django.db.models import Q
|
||||
|
||||
|
||||
from ietf.ipr.models import IprDocAlias, IprDetail
|
||||
from ietf.ipr.related import related_docs
|
||||
|
@ -15,8 +17,6 @@ from ietf.utils.draft_search import normalize_draftname
|
|||
from ietf.group.models import Group
|
||||
from ietf.doc.models import DocAlias
|
||||
|
||||
from itertools import chain
|
||||
|
||||
|
||||
def iprs_from_docs(docs):
|
||||
iprs = []
|
||||
|
@ -43,9 +43,7 @@ def patent_file_search(url, q):
|
|||
return False
|
||||
|
||||
def search(request):
|
||||
wgs = Group.objects.filter(type="wg").select_related().order_by("acronym")
|
||||
rgs = Group.objects.filter(type="rg").select_related().order_by("acronym")
|
||||
wgs = chain(wgs,rgs)
|
||||
wgs = Group.objects.filter(Q(type="wg") | Q(type="rg")).select_related().order_by("acronym")
|
||||
|
||||
search_type = request.GET.get("option")
|
||||
if search_type:
|
||||
|
|
Loading…
Reference in a new issue