<commit_before>from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS
from tastypie.contrib.gis.resources import ModelResource as GisModelResource

from inspections.models import Establishment
from inspections.api.serializers import GeoJSONSerializer


class EstablishmentResource(GisModelResource):

    class Meta:
        queryset = Establishment.objects.all()
        allowed_methods = ['get']
        serializer = GeoJSONSerializer()
        limit = 40
        filtering = {
            'est_type': ALL,
        }
        ordering = ['update_date']<commit_msg>allow filtering on location<commit_after>from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS
from tastypie.contrib.gis.resources import ModelResource as GisModelResource

from inspections.models import Establishment
from inspections.api.serializers import GeoJSONSerializer


class EstablishmentResource(GisModelResource):

    class Meta:
        queryset = Establishment.objects.all()
        allowed_methods = ['get']
        serializer = GeoJSONSerializer()
        limit = 40
        filtering = {
            'est_type': ALL,
            'location': ALL,
        }
        ordering = ['update_date']
{'fraction_non_alphanumeric': 0.07315045719035744, 'fraction_numerical': 0.0033250207813798837, 'mean_word_length': 3.36231884057971, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2240037', 'n_tokens_mistral': 332, 'n_tokens_neox': 302, 'n_words': 78}