Changes between Initial Version and Version 1 of Ticket #15804
- Timestamp:
- Apr 11, 2011, 5:05:38 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15804 – Description
initial v1 27 27 }}} 28 28 29 This happens because {{{Person}}} isn't a geo-aware model, so it doesn't know that {{{__intersects}}} is a valid lookup type. I can fix it by changing {{{Person}}} to extend {{{django.contrib.gis.db.models}}} , but that feels hacky because the {{{Person}}} model itself doesn't have any geo fields.29 This happens because {{{Person}}} isn't a geo-aware model, so it doesn't know that {{{__intersects}}} is a valid lookup type. I can fix it by changing {{{Person}}} to extend {{{django.contrib.gis.db.models}}} and adding the {{{GeoManager}}}, but that feels hacky because the {{{Person}}} model itself doesn't have any geo fields. 30 30 31 31 The solution could be to change Django's join code so that it looks at the model of the last field in the chain when determining whether a lookup is valid. I haven't looked into how difficult this would be, though. I think it's just enough of an edge case that it wouldn't be worth fixing if it required a ton of refactoring and hoop-jumping. But if it's easy, let's do it.