#25446: Can't use PostGIS function ST_OrderingEquals with GeoDjango
-----------------------------+------------------------------------
     Reporter:  ezheidtmann  |                    Owner:  nobody
         Type:  New feature  |                   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
-----------------------------+------------------------------------
Changes (by claudep):

 * version:  1.8 => master
 * type:  Bug => New feature
 * stage:  Unreviewed => Accepted


Comment:

 You are right in that GeoDjango doesn't support this lookup. In Django
 1.9, GIS lookups/functions have seen many refactorings which should allow
 you to more easily add your own lookups.

 While studying your use case, I've seen a limitation in current lookup
 implementation (#25448). After fixing this one, you should be able to add
 your custom lookup like this (not portable way):

 {{{
 from django.contrib.gis.db.models import GeometryField
 from django.contrib.gis.db.models.lookups import GisLookup

 class OrderingEqualsLookup(GISLookup):
     lookup_name = 'ST_OrderingEquals'

 GeometryField.register_lookup(OrderingEqualsLookup)
 }}}

 For Django 1.8, keep your workaround...

 We should at least document that.

--
Ticket URL: <https://code.djangoproject.com/ticket/25446#comment:2>
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/069.32c9c982da95aa5f08c4f67e1deb8857%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to