First post, creating first Django project and having a of an issue I was hoping for some help with!
I'm trying to write my own search which takes as input a user's location and returns a list of places (from my db) sorted by proximity. Here's roughly what I've got: in models.py: class Place(models.Model): ... def coordinates(self) location = Location(self.zipcode, self.street) return location (Location works beautifully, spitting out coordinates of my instances of Place which I can see on my Place page using a generic view and in the admin) But in views.py I can't figure out how to access this information. I've written a Distance function which works in interpreter, and I can convert my query into the kind of input the function can handle, but how can I access the coordinates of Place in a view?? Thanks for the help! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.