#32380: GeoDjango lookups must be accept F() input
----------------------------------------------+---------------------------
               Reporter:  mohammadhasanzadeh  |          Owner:  nobody
                   Type:  New feature         |         Status:  new
              Component:  GIS                 |        Version:  2.2
               Severity:  Normal              |       Keywords:  geodjango
           Triage Stage:  Unreviewed          |      Has patch:  0
    Needs documentation:  0                   |    Needs tests:  0
Patch needs improvement:  0                   |  Easy pickings:  0
                  UI/UX:  0                   |
----------------------------------------------+---------------------------
 For example, if we need to calculate the distance between two model field
 with the `distance_gte` lookup like the following:

 {{{
 return
 
queryset.filter(checkin_position__distance_gte=(F("doctor_location__location__position"),
 D(km=200)) )
 }}}

 We will get the following error:
 `ValueError: Cannot use object with type F for a spatial lookup
 parameter.`

 Note that `doctor_location__location__position` is a `PointField`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32380>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.8b2fb7931c96000228b269f4d76155a1%40djangoproject.com.

Reply via email to