From 5fddfc4b7ca86d221aeb1599d2227dd22dd504a4 Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Mon, 16 Dec 2019 16:55:24 +0100 Subject: [PATCH] https und suche --- users/__pycache__/views.cpython-38.pyc | Bin 14950 -> 14950 bytes users/templates/users/base.html | 4 ++-- users/views.py | 21 --------------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/users/__pycache__/views.cpython-38.pyc b/users/__pycache__/views.cpython-38.pyc index ea114578f57ac12ec71a3350a5260ad63e85c0fe..584db81ecf81c78fed1177a084c2428d6e47675c 100644 GIT binary patch delta 65 zcmaD>@~ng}l$V!_0SF$f_#XSkZzErjHY4NYMD0V2b2qE#__8oA-dtpGn1%7#W;4^5 UjEvHo70m6K+4(rwIGj050qt)TEdT%j delta 65 zcmaD>@~ng}l$V!_0SI(fe2*0f+Q=8A%_ufGQTq_%rp+okzATJ8HWwKjW?}rj+067M UBcs7)1#^35c4ZDW4rdNi0IJm!7XSbN diff --git a/users/templates/users/base.html b/users/templates/users/base.html index 86bb513..d6a502b 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -29,8 +29,8 @@ - - + + diff --git a/users/views.py b/users/views.py index 05e347b..ba4bc8c 100644 --- a/users/views.py +++ b/users/views.py @@ -404,27 +404,6 @@ def GlobalSearch(request): res_areas = Areas.objects.filter(agency__pk=ag).filter(name__icontains=searchfor) res_tasks = Tasks.objects.filter(agency__pk=ag).filter(name__icontains=searchfor) |Tasks.objects.filter(agency__pk=ag).filter(area__name__icontains=searchfor) res_pers = User.objects.filter(profile__agency__pk=ag).filter(first_name__icontains=searchfor) | User.objects.filter(profile__agency__pk=ag).filter(last_name__icontains=searchfor) - ''' - results_st = list(results) - final_results_st = [] - i = 0 - for ele in results_st: - tempele = {} - tempele['id'] = ele.pk - tempele['name'] = ele.name - # First 100 chars of the Content - tempele['content'] = cleanhtml(ele.content[:100]) - tempele['first_name'] = ele.created_standard_by.first_name - tempele['last_name'] = ele.created_standard_by.last_name - tempele['first_name_mod'] = ele.last_modified_by.first_name - tempele['last_name_mod'] = ele.last_modified_by.last_name - tempele['created'] = formats.date_format(ele.created_standard_date, "d.m.Y") - tempele['last_modified_on'] = formats.date_format(ele.last_modified_on, "d.m.Y") - final_results_st.append(tempele) - i += 1 - ''' - - #return JsonResponse({'standards' : final_results_st}) html = render_to_string('users/searchres.html', {'res_standard': res_standard, 'res_areas': res_areas, 'res_tasks': res_tasks, 'res_pers': res_pers}) return HttpResponse(html) else: