Commit Graph

23 Commits

Author SHA1 Message Date
j 548a73f121 python3 only: remove six.moves imports 2020-05-29 12:17:18 +02:00
j 844382b1e8 drop python2 support, upgrade to django 3 2020-05-29 00:25:16 +02:00
j dbf740e55e use .editorconfig 2018-06-19 08:33:26 +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
Will Thompson 2812834ce3
findAnnotations: don't lowercase ids (fixes #2916)
Without this fix, a condition like:

     {key: 'id', operator: '==', value: 'A/B'}

gets mapped to:

     public_id__exact=('A/B'.lower())

which is wrong.

I introduced this bug in b3df5b8. I didn't catch it because I was
mostly interested in the 'layer' key -- but layer names are
conventionally lowercase anyway so lowercasing them had no effect.
2016-04-29 11:03:45 +01:00
Will Thompson b3df5b8d56 findAnnotations: match some fields case-sensitively
Requiring layer to have the right case is consistent with
addAnnotation(), and means the _layer[_like] index can be used. In my
testing, if itemsQuery specifies a single item, then postgres doesn't
bother with the layer index anyway; but if not, it makes a pretty big
(~3×) difference.

Matching public_id and item__public_id case-sensitively also seems
reasonable (it's consistent with get() and getAnnotation()).

(Is lower() redundant for the case-insensitive comparisons? ie. is
UPPER(x.lower()) == UPPER(x)? I'm not sure, it's cheap, let's leave it.)
2016-04-05 12:19:32 +01:00
Will Thompson 8d1b4de337 findAnnotations(): make 'findvalue' the default key
Annotations have no 'name' field, so

     findAnnotations({query: {conditions: [{value: 'foo'}]}})

would previously raise an exception.
2016-04-05 12:19:31 +01:00
j 051a3578b4 inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
j 24f81cdeae add item as valid key for findAnnotations 2014-12-28 11:39:08 +01:00
j ec5158c03a normalize find values and make lower case, also normalize and lowercase quieries 2012-11-18 20:26:13 +01:00
j 49ae89eb9b oembed, dont leak private layers 2012-01-10 21:30:41 +05:30
j 28a577d69f use annotation find value 2011-12-26 21:05:39 +05:30
j 0feace7a8b decode_id 2011-11-06 20:36:35 +01:00
j bc118c67ee switch to base26 ids 2011-10-01 00:28:35 +02:00
j 7982ba6b29 dont filter empty conditions 2011-09-28 18:00:13 +00:00
j 6f0393d12c events and places 2011-09-28 03:40:36 +02:00
j 52df791560 - use getPage for site dialog
- add events and users dialog and backend
- add some values to preferences/settings dialog
- more migration of backend to new query api
2011-09-25 01:09:48 +02:00
j f228a4a5e5 funky annotation ids 2011-08-18 13:53:38 +02:00
j 2ed6a707f5 places 2011-06-20 18:14:38 +02:00
j 6c21c02359 place name 2011-06-20 17:27:06 +02:00
j 75bdebe0de clips next to map 2011-06-20 17:02:53 +02:00
j f4bd971f0a filter annnotations 2011-06-17 09:44:45 +02:00