From e0414588ba8e55921cd4d071d1f5a93f139b52f2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 22 Feb 2011 16:26:06 +0100 Subject: [PATCH] remove _ --- pandora/archive/views.py | 4 ++-- pandora/item/views.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index ad7f219..8ee34ec 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -16,7 +16,7 @@ from ox.django.views import task_status from item import utils from item.models import get_item -from item.views import _parse_query +from item.views import parse_query import item.tasks from api.actions import actions @@ -375,7 +375,7 @@ Positions data = json.loads(request.POST['data']) if settings.JSON_DEBUG: print json.dumps(data, indent=2) - query = _parse_query(data, request.user) + query = parse_query(data, request.user) response = json_response({}) if 'group' in query: diff --git a/pandora/item/views.py b/pandora/item/views.py index 5a4c084..ac942a8 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -79,7 +79,7 @@ def _order_by_group(query): order_by = ('-value_sort', 'items') return order_by -def _parse_query(data, user): +def parse_query(data, user): query = {} query['range'] = [0, 100] query['sort'] = [{'key':'title', 'operator':'+'}] @@ -166,7 +166,7 @@ Positions data = json.loads(request.POST['data']) if settings.JSON_DEBUG: print json.dumps(data, indent=2) - query = _parse_query(data, request.user) + query = parse_query(data, request.user) response = json_response({}) if 'group' in query: @@ -271,7 +271,7 @@ def autocomplete(request): order_by = '-items' sort_type = key.get('sort', key.get('type', 'string')) if sort_type == 'title': - qs = _parse_query({'query': data.get('query', {})}, request.user)['qs'] + qs = parse_query({'query': data.get('query', {})}, request.user)['qs'] if data['value']: if op == '': qs = qs.filter(find__key=data['key'], find__value__icontains=data['value'])