Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove djsonb dependency and move its relevant logic into Grout core #7

Merged
merged 7 commits into from
Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
Changes we're making en route to version 2.0. When we cut a release, this
section will form the changelog for v2.0.

- Add support for Django 2.0 ([#8](https://github.com/azavea/grout/pull/8))
- Removed external `djsonb` dependency and moved its lookup logic into
Grout core ([#7](https://github.com/azavea/grout/pull/7)
- Removed extraneous location fields from the `Record` data model (
[#5](https://github.com/azavea/grout/pull/5)), including:
- `city`
Expand Down
5 changes: 2 additions & 3 deletions grout/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.core.exceptions import ImproperlyConfigured
from django.contrib.gis.db import models as gis_models
from django.contrib.gis.gdal.error import GDALException
from django.contrib.postgres.fields import JSONField
from django.db.models import Q

from rest_framework.exceptions import ParseError, NotFound
Expand All @@ -16,12 +17,10 @@
from grout.models import Boundary, BoundaryPolygon, Record, RecordType
from grout.exceptions import QueryParameterException

from djsonb import fields as jsb


# Map custom fields to CharField so that django-filter knows how to handle them.
FILTER_OVERRIDES = {
jsb.JsonBField: {
JSONField: {
'filter_class': django_filters.CharFilter
},
gis_models.PointField: {
Expand Down
Loading