From dab85ad4fc04a75c14c52e2bbb0f1a18eb3c6e93 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 2 Oct 2011 17:39:34 +0200 Subject: [PATCH 1/3] return each place only once --- pandora/place/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/place/views.py b/pandora/place/views.py index b78cbeed..71ef3e0a 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -225,6 +225,7 @@ Positions query = parse_query(data, request.user) qs = order_query(query['qs'], query['sort']) + qs = qs.distinct() if 'keys' in data: qs = qs[query['range'][0]:query['range'][1]] response['data']['items'] = [p.json(data['keys'], request.user) for p in qs] From 351386df82de632ffa26af35fe00d5bac3e1b78e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 2 Oct 2011 17:39:49 +0200 Subject: [PATCH 2/3] speedup rebuildcache --- pandora/item/management/commands/rebuildcache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/item/management/commands/rebuildcache.py b/pandora/item/management/commands/rebuildcache.py index a3f2417f..570b30af 100644 --- a/pandora/item/management/commands/rebuildcache.py +++ b/pandora/item/management/commands/rebuildcache.py @@ -20,8 +20,8 @@ class Command(BaseCommand): def handle(self, **options): offset = 0 chunk = 100 - pos = models.Item.objects.count() - while offset <= models.Item.objects.count(): + count = pos = models.Item.objects.count() + while offset <= count: for i in models.Item.objects.all().order_by('id')[offset:offset+chunk]: print pos, i.itemId i.save() From 0801b4efa035ecec20dca98f57b561669b9a5675 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 2 Oct 2011 17:40:48 +0200 Subject: [PATCH 3/3] site specific fail page --- static/50x.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/static/50x.html b/static/50x.html index be99c945..6ba31bdb 100644 --- a/static/50x.html +++ b/static/50x.html @@ -5,14 +5,17 @@ body { text-align: center; padding-top: 96px; + background: #101010; + color: #F0F0F0; } + +We'll be back in a minute - - -

+ + +

We'll be back in a minute. -

- +