#25448: Ease creation of custom GIS lookups
--------------------------------------+------------------------------------
     Reporter:  claudep               |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  GIS                   |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by claudep):

 Planned modification (to be tested):
 {{{
 #!diff
 diff --git a/django/contrib/gis/db/models/lookups.py
 b/django/contrib/gis/db/models/lookups.py
 index 46104a2..33fa635 100644
 --- a/django/contrib/gis/db/models/lookups.py
 +++ b/django/contrib/gis/db/models/lookups.py
 @@ -93,7 +93,7 @@ class GISLookup(Lookup):
          sql_params.extend(rhs_params)

          template_params = {'lhs': lhs_sql, 'rhs': rhs_sql}
 -        backend_op = connection.ops.gis_operators[self.lookup_name]
 +        backend_op = connection.ops.gis_operators.get(self.lookup_name,
 self.lookup_name)
          return backend_op.as_sql(connection, self, template_params,
 sql_params)


 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25448#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.fec5739358a1f74d24d18e47d1de219a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to