Commit Graph

99 Commits

Author SHA1 Message Date
j dbf740e55e use .editorconfig 2018-06-19 08:33:26 +02:00
j 859a820c90 add ui for lists/edits/collections groups 2018-03-06 15:11:05 +05:30
j 6c6b60ffaf lower auth deps 2017-12-31 14:21:18 +01:00
j 85c5fafe0d add groups to collections, edits and lists, towards #3063 2017-12-31 14:06:27 +01:00
j 6d867b1a7d return 404 not 403 for private edits, fixes #3024 2017-05-29 12:14:50 +02:00
j be34383f8c expose per clip volume in edits 2017-04-15 13:45:31 +02:00
j f0a4aba751 use python_2_unicode_compatible 2017-03-03 08:56:35 +01: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 97a46dceb0 fix sort of static edits 2016-08-23 13:24:27 +02:00
j 9685c7e4a5 fix streams for static edits 2016-08-23 13:24:22 +02:00
j e9863c238e always use get_operator, avoid case-insensitive match if possible 2016-06-30 11:28:09 +02:00
j 5e149a5cb8 add space and other flake8 cleanups 2016-05-28 11:26:46 +02:00
j 0d5c968026 space 2016-02-20 10:41:23 +00:00
j 051a3578b4 inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
j 4219246909 db migration 2016-02-20 15:15:01 +05:30
j 1cc795995d user.get_profile()->user.profile 2016-02-19 22:06:11 +05:30
j 5d63ad1760 default/upload_to=lambda breaks migrations, use functions 2016-02-19 21:59:26 +05:30
j e22cc432b3 use transaction.atomic 2016-02-19 21:55:09 +05:30
j e738503380 remove old migrations 2016-02-19 15:17:18 +00:00
j 35bdfba77c fix default values 2016-02-19 19:01:38 +05:30
j d241b90b63 check data is a dict 2016-02-19 18:46:53 +05:30
j 2e3b61d163 dont fail if files are already gone 2015-10-04 18:17:34 +01:00
j be1589569e fix clip index for newly added clips 2015-10-04 11:04:46 +01:00
Will Thompson eebb0b5681 Combine {Item,Clip,edit.Clip}.get_layers()
This has several benefits:

    • Clip.get_layers() (used by smart edits) and Item.get_layers() pick up
    the select_related('user') optimization added for static edits in
    r5007.

    • Static edits and items pick up the optimization from r4941 to select
    annotations once, not once per layer.

Fetching an item with ~1000 annotations took ~1s without this patch,
~0.34s with this patch. Another item with ~6000 annotations took ~11.6s
before, ~8.6s after.

Because this block is moved out to the top:

if user and user.is_anonymous():
user = None

then, for anonymous users,

"editable": false,

is no longer included in the annotations. The old behaviour ended up
including this key in all layers listed before the first private layer
in the config, and leaving it out from later ones. So this new behaviour
is more consistent.
2015-09-14 14:06:43 +02:00
Will Thompson 3da3bd37fd addClips: return error if item/in/out missing, not 500 2015-08-07 13:37:56 +02:00
Will Thompson f3fdded07d Edit.json: preload annotation users
The expensive part of fetching an edit is JSONifying the clips'
annotations. Profiling showed that the main cost was Annotation.json(),
and within that:

File: /srv/pandora/pandora/annotation/models.py
Function: json at line 216

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
216                                               def json(self, layer=False, keys=None, user=None):
217       632          827      1.3      0.1          j = {
218       632      1048170   1658.5     89.6              'user': self.user.username,
219                                                   }

Obviously this join just moves some of the cost further out, but it
brings my micro-benchmark down from 1.3s to 0.3s.
2015-08-02 16:02:47 +02:00
Will Thompson ab5a20d3a2 Treat findEdits({}) like findEdits({query: {}}) (fixes #2820) 2015-07-22 21:37:55 +02:00
j abf445b7f1 faster edits 2015-04-25 19:02:34 +02:00
j 9197591bb6 tune smart clip queries 2015-04-25 16:13:42 +02:00
j 7b401cfe28 round duration to 3 2015-03-26 20:28:07 +05:30
j 5347c2e619 dont fail if condition does not have a value 2015-01-24 16:00:24 +05:30
j 139a5e3722 handle cut issues 2014-12-23 12:49:59 +00:00
rolux ea1a94e9e4 update api docs (omissions, wording, typos) 2014-12-21 13:03:49 +00:00
rolux 3950213960 update api docs 2014-12-19 15:31:57 +00:00
rolux cada20f904 update api docs 2014-12-19 15:05:08 +00:00
rolux 4a084d8405 update api docs 2014-12-19 12:59:10 +00:00
rolux 1ddc23b9f3 update api docs 2014-12-18 22:16:37 +00:00
rolux 0a56268b92 update api docs 2014-12-18 19:26:37 +00:00
rolux 7cfdf7b8db update api docs 2014-12-18 18:18:18 +00:00
rolux 8fd99ac1be update api docs 2014-12-18 16:39:47 +00:00
rolux b78cc2c3f0 update api docs 2014-12-18 14:51:35 +00:00
rolux 51ad1475e0 update api docs 2014-12-18 13:49:51 +00:00
rolux cf836ec172 add api docs 2014-12-18 13:38:20 +00:00
j 9e9bf30c42 add new changelog and call add_changelog all over the place 2014-12-17 13:45:46 +00:00
j a9091db9ef clip_qs 2014-11-21 14:15:42 +00:00
j c9fa0c78cd add missing imports 2014-11-20 18:30:12 +00:00
rolux 9e5fea2d06 start to improve API docs 2014-11-15 18:39:16 +00:00
j 8cb776eb51 compute edit duration more efficiently 2014-11-10 11:39:38 +01:00
j ceb507020b data is passed to api functions now 2014-10-06 08:26:43 +00:00
j 3232ce6989 rename Item.itemId to Item.public_id 2014-09-19 12:26:46 +00:00