def show_conflicts(request):
    if request.GET:
        search = request.GET.get('search', '')
        records, error = search_type(search, 'SYS')
        try:
            total = records.count()
            records = records
        except MySQLdb.OperationalError, e:
            if "Got error " in str(e) and " from regexp" in str(e):
                # This is nasty. If the user is using an invalid regex
                # patter, the db might shit a brick
                total = 0
                records = []
            else:
                raise

        return render(request, 'slurpee/conflicts.html', {
            'search': search,
            'total': total,
            'records': records,
            'get_conflicts': get_conflicts,
            'getattr': getattr
        })
    else:
        return render(request, 'slurpee/conflicts.html', {
            'search': '',
            'total': 0
        })
This view is temporary. It can be used to convert a system using KV objects
dataset/ETHPy150Open mozilla/inventory/slurpee/views.py/show_conflicts