Example #1
0
def search(request):
    section = "spreadsheets"
    search_proxies = SpreadsheetSearchProxy.objects_by_account(request.account).all()
    if 'q' in request.GET:
        q = request.GET['q']
        if q != "":
            search_proxies = SpreadsheetSearchProxy.search(request.account, q,ignorable_chars=["-","(",")"])
    return locals()
Example #2
0
def search_results(request):
    section = "spreadsheets"
    search_proxies = SpreadsheetSearchProxy.objects_by_account(request.account).all()
    if 'q' in request.GET:
        q = request.GET['q']
        if q != "":
            search_proxies = SpreadsheetSearchProxy.search(request.account, q,ignorable_chars=["-","(",")"])

    return {"fragments":{"main_search_results":render_to_string("spreadsheets/_search_results.html", locals())}}
Example #3
0
    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."