Re: Adding an Index to a model with a custom Field.

2017-12-05 Thread charettes
Hello Jan, I'm a bit surprised the `contribute_to_class` approach isn't working but I remember there was previous discussions to support passing an `Index` instance to the `Field.db_index` option or to allow an `index_class` attribute to be defined on `Field` subclasses to determine what kind o

PR for Admin view permission

2017-12-05 Thread Olivier Dalang
Hi ! Just wanted to draw attention towards PR 6734 that adds a view permission to Django admin (original work done by PetrDlouhy). I was hoping to get it merged for 1.11, then 2.0. I just merged in the new code, and now there's some tests failing again

Re: Adding an Index to a model with a custom Field.

2017-12-05 Thread James Bennett
I can think of several cases where I'd want a custom field to be able to add an index, and contribute_to_class() is, as you say, the natural place to do it -- it's the hook for everything else fields want to add as part of their setup. So I'd be +1 on making sure it's possible to add indexes throu

Adding an Index to a model with a custom Field.

2017-12-05 Thread Jan Pieter Waagmeester
As part of django-modeltrans , I'm trying to add a GinIndex to the model when a custom Field is added. The simplified version of my naive implementation looks like this: from django.contrib.postgres.fields import JSONField from django.contrib.postgre

Re: Rewrite the Django wiki page

2017-12-05 Thread Nes Dis
That works :) Thank you for the super fast reply! On Mon, Dec 4, 2017 at 9:31 PM, Tim Graham wrote: > You need to login using one of the buttons on the top of the page, then an > "Edit this page" button will appear at the bottom. > > On Monday, December 4, 2017 at 10:36:03 AM UTC-5, Nes Dis wro