From 6362b4df397c355be262ce0e7e0edce63cf0d52c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 19 Oct 2011 16:32:11 +0000 Subject: [PATCH] rename --- pandora/item/views.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index dfcda3b11..5b9b0003c 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -91,10 +91,13 @@ def parse_query(data, user): query[key] = data[key] query['qs'] = models.Item.objects.find(data, user) - if 'clipsQuery' in data: - query['clip_qs'] = Clip.objects.find({'query': data['clipsQuery']}, user).order_by('start') - query['clip_items'] = data['clipsQuery'].get('items', 5) - query['clip_keys'] = data['clipsQuery'].get('keys', ['id', 'in', 'out', 'annotations']) + if 'clips' in data: + query['clip_qs'] = Clip.objects.find({'query': data['clips']['query']}, + user).order_by('start') + query['clip_items'] = data['clips'].get('items', 5) + query['clip_keys'] = data['clips'].get('keys') + if not query['clip_keys']: + query['clip_keys'] = ['id', 'in', 'out', 'annotations'] #group by only allows sorting by name or number of itmes return query @@ -135,6 +138,7 @@ Groups 'key': string, 'group': string, 'range': array + clips: {} } query: query object, more on query syntax at