forked from 0x2620/pandora
rename
This commit is contained in:
parent
80ade383f9
commit
6362b4df39
1 changed files with 8 additions and 4 deletions
|
@ -91,10 +91,13 @@ def parse_query(data, user):
|
||||||
query[key] = data[key]
|
query[key] = data[key]
|
||||||
query['qs'] = models.Item.objects.find(data, user)
|
query['qs'] = models.Item.objects.find(data, user)
|
||||||
|
|
||||||
if 'clipsQuery' in data:
|
if 'clips' in data:
|
||||||
query['clip_qs'] = Clip.objects.find({'query': data['clipsQuery']}, user).order_by('start')
|
query['clip_qs'] = Clip.objects.find({'query': data['clips']['query']},
|
||||||
query['clip_items'] = data['clipsQuery'].get('items', 5)
|
user).order_by('start')
|
||||||
query['clip_keys'] = data['clipsQuery'].get('keys', ['id', 'in', 'out', 'annotations'])
|
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
|
#group by only allows sorting by name or number of itmes
|
||||||
return query
|
return query
|
||||||
|
@ -135,6 +138,7 @@ Groups
|
||||||
'key': string,
|
'key': string,
|
||||||
'group': string,
|
'group': string,
|
||||||
'range': array
|
'range': array
|
||||||
|
clips: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
query: query object, more on query syntax at
|
query: query object, more on query syntax at
|
||||||
|
|
Loading…
Reference in a new issue