Changes between Initial Version and Version 1 of Ticket #15804


Ignore:
Timestamp:
Apr 11, 2011, 5:05:38 PM (13 years ago)
Author:
Adrian Holovaty
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15804 – Description

    initial v1  
    2727}}}
    2828
    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.
     29This 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.
    3030
    3131The 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.
Back to Top