def search(request): section = "groups" search_proxies = GroupSearchProxy.objects_by_account(request.account).all() if 'q' in request.GET: q = request.GET['q'] if q != "": search_proxies = GroupSearchProxy.search(request.account, q,ignorable_chars=["-","(",")"]) return locals()
def search_results(request): section = "groups" search_proxies = GroupSearchProxy.objects_by_account(request.account).all() if 'q' in request.GET: q = request.GET['q'] if q != "": search_proxies = GroupSearchProxy.search(request.account, q,ignorable_chars=["-","(",")"]) return {"fragments":{"main_search_results":render_to_string("groups/_search_results.html", locals())}}
def handle(self, *args, **options): from people.models import PeopleSearchProxy from organizations.models import OrganizationsSearchProxy from groups.models import GroupSearchProxy from spreadsheets.models import SpreadsheetSearchProxy print "Repopulating people...", PeopleSearchProxy.populate_cache() print "done." print "Repopulating organizations..." OrganizationsSearchProxy.populate_cache() print "done." print "Repopulating groups..." GroupSearchProxy.populate_cache() print "done." print "Repopulating spreadsheets..." SpreadsheetSearchProxy.populate_cache() print "done."