Skip to content

Commit

Permalink
filter zero values from getting rendered
Browse files Browse the repository at this point in the history
Kicks a few thousand markers, so helps with GH #14
  • Loading branch information
crccheck committed May 4, 2015
1 parent 93838e0 commit 19c480f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ clean:
find . -name "*.pyc" -delete
find . -name ".DS_Store" -delete

# make sure to install the hstore extension in template1
# Note: make sure to install the hstore extension in template1
test:
ENVIRONMENT=test $(MANAGE) test
$(MANAGE) test


resetdb:
Expand Down
4 changes: 3 additions & 1 deletion mixed_beverages/apps/lazy_geo/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from django.contrib.admin.views.decorators import staff_member_required
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.http import (
HttpResponseBadRequest, JsonResponse, HttpResponseRedirect,
HttpResponseForbidden,
Expand Down Expand Up @@ -37,7 +38,8 @@ def get(self, request, *args, **kwargs):


class MarkerList(GeoJSONLayerView):
queryset = models.Location.objects.exclude(coordinate=None)
queryset = models.Location.objects.filter(coordinate__isnull=False).exclude(
Q(data__avg_tax='0') | Q(data__avg_tax='0.00'))
geometry_field = 'coordinate'
precision = 6
properties = ('coordinate_quality', 'data',)
Expand Down

0 comments on commit 19c480f

Please sign in to comment.