Skip to content

Instantly share code, notes, and snippets.

@math77
Created May 17, 2019 22:52
Show Gist options
  • Save math77/ab9a7d722b62d045dd6c104f2a01de2c to your computer and use it in GitHub Desktop.
Save math77/ab9a7d722b62d045dd6c104f2a01de2c to your computer and use it in GitHub Desktop.
location_user = Point(-6.291, -36.020, srid=4326)
Locais.objects.annotate(distance=Distance("location", location_user)).order_by('distance')
@math77
Copy link
Author

math77 commented May 18, 2019

O meu modelo está dessa forma:
AAAAmodelo

Será que pode ser algo do MySQL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment