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() 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] 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. -

- +