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

Filtering Querysets with GeopositionField #50

Open
jangeador opened this issue Aug 26, 2015 · 2 comments
Open

Filtering Querysets with GeopositionField #50

jangeador opened this issue Aug 26, 2015 · 2 comments

Comments

@jangeador
Copy link

Can you please tell me how I can filter the recordset to only the records which contain data in the Geoposition Field.

I have tried:
object.queryset.filter(position__isnull=True) and that gives me nothing, now
object.queryset.filter(position__isnull=False) gives me all the records even though only some have geopositionfield populated.

@jvamvas
Copy link

jvamvas commented Aug 4, 2016

Looking at the way empty values are currently stored in the database, I suggest the following hack: object.queryset.exclude(position='None')

@Voxmundi
Copy link

How can we filter according to specific lat long values?
I have tried:
queryset.filter(location__latitude__lte=Lat)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants