On Wednesday, 6 December 2017 00:45:09 UTC+1, charettes wrote:
>
> From what I remember this feature was planned to be used to replace `
> BaseSpatialField`
> special handling of `spatial_index` and allow custom fields to define
>
> This lead me to some DEP drafts on indexes here:  
 - https://github.com/django/deps/pull/6
 - https://github.com/django/deps/pull/19

The latter seems to be more complete, quite some concepts of it seem to be 
implemented. It also notes the way a Field would specify the index it wants:

Field will gain a method get_default_index which will be called when 
> db_index=True is passed to the __init__. The default value would be the 
> SpatialIndex in gis, which will mark the start of deprecation of 
> spatial_index which would be supported with deprecation warnings.


I am not sure why this was never implemented. The DEP also proposes the 
db_index argument to fields to accept Index instances, which is also not 
implemented.

While those are all interesting proposals to provide a nicer API, I still 
think the behavior described in my original post needs fixing. I'll post 
any progress here.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/afce7b2b-7c33-4fe0-bb7f-784a780a580f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to