j
844382b1e8
drop python2 support, upgrade to django 3
2020-05-29 00:25:16 +02:00
j
faeb2ddd2d
document folded annotations, include clip_id in annots
2019-11-12 11:40:14 +00:00
j
55b86bdac8
use get_or_create(defaults...)
2018-11-20 16:15:08 +01:00
j
9983fdbf1e
layer does not need special case
2018-11-06 15:33:08 +01:00
j
04e1adf53e
return annotation layer by default
2018-10-09 19:44:12 +02:00
j
f93ece1ab7
add db based translations
...
load translations from files
and adds option to translate
string layers (i.e. keywords)
2018-09-19 16:53:30 +02:00
j
1e5d7e99b3
merge comment
2018-09-18 11:05:58 +02:00
j
6296be870b
use get_user_model
2018-07-29 21:12:56 +01:00
j
bd0732b8d5
rename item.json -> item.cache
2018-07-09 15:22:12 +02:00
j
dbf740e55e
use .editorconfig
2018-06-19 08:33:26 +02:00
j
41d4e52f84
don't fail on removed layers
2017-07-26 13:33:08 +02:00
j
fb738c25cf
self.id
2017-06-28 12:55:01 +02:00
j
fbd94867fc
fix documents
2017-06-01 17:00:36 +02:00
j
f0a4aba751
use python_2_unicode_compatible
2017-03-03 08:56:35 +01:00
j
12f3901c9a
py3 filter->list(filter
2017-02-16 14:24:51 +01:00
j
b23ca9df74
store document references in db
2017-01-26 15:56:28 +00:00
j
4d1711cb01
only update subtitles if needed
2016-09-06 00:13:40 +02:00
j
d53659c0c4
move annotation update_matches logic into models
2016-09-05 23:46:36 +02:00
j
1c580a2df7
async update of annotation matches, fixes deadlock in load_subtitles
2016-08-31 18:03:19 +02:00
j
1468ddbecb
towards supporting python 2 and 3
...
- use absolute_imports
- make use of six.moves
- use exec instead of execfile
- use list(dict) instead if dict.keys()
2016-08-25 18:34:36 +02:00
j
e9863c238e
always use get_operator, avoid case-insensitive match if possible
2016-06-30 11:28:09 +02:00
j
b6e4d33a43
add Annotation.findvalue index (used by findClips)
2016-06-30 02:42:24 +02:00
Will Thompson
aa40a40595
Annotation.json: only include entity id & name
...
Fetching documents for each entity in turn is expensive. (I have tried
using ArrayAgg to fetch them in the same query as the Entity — no
improvement. It's possible that being able to join to entity_entity,
and then use ArrayAgg, would be better.)
Even once you've fetched them all, if the same entity appears many
times in an item, then get(..., keys=['layers']) duplicates the whole
JSON for the entity many times: expensive to serialize, expensive to
send over the wire.
Pandora's own web interface only depends on the 'id' key of 'entity' in
each annotation, and refetches the rest of the entity to show the pop-up
dialog when you press E. So by just not bothering to fetch and send any
other keys, get(..., keys=['layers']) on an item with many entity
annotations is substantially faster.
(I experimented with splitting the full entities off to one side, so,
you'd have:
{
"layers": {
somelayer: [...,
{..., "entity": {"id": ABC}},
], ...
},
"entities": {
ABC: {...},
...
}
}
This is quicker than the status quo, but obviously not as fast as not
fetching & sending the rest at all!)
2016-04-28 14:15:23 +01:00
Will Thompson
400b6650a2
Annotation.json: document empty-subtitle special case
2016-04-19 13:52:52 +01:00
Will Thompson
af0d87b569
Annotation.json: reduce repeated layer lookups
...
It's actually quite costly to look up keys in CONFIG, particularly
inside a loop: this trims ~5% off get(keys=['layers']) for
annotation-heavy items.
2016-04-19 13:52:47 +01:00
j
1cc795995d
user.get_profile()->user.profile
2016-02-19 22:06:11 +05:30
j
e22cc432b3
use transaction.atomic
2016-02-19 21:55:09 +05:30
Will Thompson
4f064fda76
Make Annotation.public_id non-NULLable ( fixes #2829 )
...
This fixes this race:
request 1 request 2
----------------------------- -------------------------
addAnnotation(...)
super(Annotation.self).save()
findAnnotations(...)
returns [{id: null, ...}]
annotation.public_id = x
returns {id: x}
2015-09-14 14:18:10 +02:00
Will Thompson
8759b569da
Cache serialized entities when fetching many annotations
...
For a scene with ~5600 annotations, of which ~3100 are entities, this
cuts fetching the scene from 12 seconds to 2 seconds.
2015-09-14 14:08:02 +02:00
j
819181726a
slightly faster json serialization of annotations
2015-08-02 16:22:45 +02:00
j
ef56f4aec4
track annotation id in table to avoid IntegrityErrors while adding multiple annotations to one item, fixes #2780
2015-05-20 00:43:33 +05:30
j
e851dcabfb
entities are not links
2015-04-16 20:02:31 +00:00
j
1fb075a350
rename layer
2015-04-16 10:53:05 +01:00
j
484b33e39d
add option to return item keys in findAnnotation
2015-02-16 16:10:45 +00:00
j
f144a020ec
typo
2015-02-13 17:32:12 +00:00
j
f7bbcf027a
fix findvalue for entity annotations
2015-02-13 15:22:14 +00:00
j
ccfaa7db4a
add entity/document relation
2015-02-13 11:06:09 +00:00
j
ad8db3a293
return html value for entities
2015-02-06 15:11:19 +05:30
j
6662872225
remove unused import
2014-12-23 11:28:42 +00:00
j
4c582c14b5
better related name
2014-12-22 14:29:30 +00:00
j
9e9bf30c42
add new changelog and call add_changelog all over the place
2014-12-17 13:45:46 +00:00
j
901bd37e90
resolve entity to name, get_by_name for add/edit annotation api calls
2014-12-16 16:39:45 +00:00
j
15fb864d74
get entity by id after all
2014-12-16 15:21:24 +00:00
j
d52dc11b4c
get entity by name
2014-12-16 14:59:21 +00:00
j
b7ab390425
towards entity layer
2014-11-20 13:20:48 +00:00
j
928cc11663
wrap annotation updates into transactions
2014-11-18 14:55:21 +00:00
j
d6c10eb377
add getAnnotation, fixes #2572
2014-11-17 19:56:27 +00:00
j
25d794e803
create clips for all annotations
2014-11-17 16:56:30 +00:00
j
d6513d4570
return item id, exclude empty annotations
2014-10-26 17:44:36 +00:00
j
3232ce6989
rename Item.itemId to Item.public_id
2014-09-19 12:26:46 +00:00