@@ -0,0 +1,950 @@
+%EF%BB%BFimport json%0D%0Afrom django.db.models import Q%0D%0Afrom django.contrib.auth.models import User%0D%0Afrom django.views.generic import ListView%0D%0Afrom django.http import Http404, HttpResponse%0D%0A%0D%0Aclass UserSearchView(ListView):%0D%0A    %0D%0A    %22%22%22Search users.%22%22%22%0D%0A    %0D%0A    model=User%0D%0A    %0D%0A    def render_to_response(self, context, **response_kwargs):%0D%0A        if self.request.is_ajax():%0D%0A            return HttpResponse(json.dumps(context),%0D%0A                                content_type='application/json',%0D%0A                                **response_kwargs)%0D%0A        raise Http404%0D%0A    %0D%0A    def get_queryset(self):%0D%0A        search_term = self.request.GET%5B'q'%5D if 'q' in self.request.GET else ''%0D%0A        users = User.objects.filter(Q(username__icontains=search_term) %7C Q(first_name__icontains=search_term) %7C Q(last_name__icontains=search_term)).distinct()%0D%0A        return %5B%7B%22name%22: u.get_full_name(), %22username%22: u.username, %22id%22: u.id%7D for u in users%5D%0D%0A    %0D%0A%0D%0A

add views/user.py