Re: Usage of field cardinality flags in database schema backends

2015-02-04 Thread Tim Graham
Seems to me it would be useful to work with some external projects (like taggit) to convert their projects to use only public APIs -- otherwise we are stumbling around in the dark trying to figure out theoretical use cases. On Monday, February 2, 2015 at 5:41:06 AM UTC-5, Anssi Kääriäinen wrote:

Re: Usage of field cardinality flags in database schema backends

2015-02-02 Thread Anssi Kääriäinen
I don't like the idea of extended usage of field.get_internal_type(). The problem is that we haven't defined what the internal_type means, and it is actually used for different meanings in different places of code currently. As an example, AutoFields have internal type as AutoField. The AutoFiel

Re: Usage of field cardinality flags in database schema backends

2015-02-02 Thread Loïc Bistuer
Thanks Markus for the detailed report. On a conceptual level I think we should aim for: - django.db.* only relies on get_internal_type(). - django.* only relies on field flags. To address the immediate regressions I suggest we backport https://github.com/django/django/pull/4002/files as far bac

Re: Usage of field cardinality flags in database schema backends

2015-01-31 Thread sokandpal
Yes, it seems reasonable, because schema should deal with internal type and not with field flags such as field.many_to_many. So, the summary is: For 1.8: https://github.com/django/django/pull/4014 Then https://github.com/django/django/pull/3998 (for 1.7 and 1.8 and current master) For 1.9: htt

Usage of field cardinality flags in database schema backends

2015-01-31 Thread Markus Holtermann
Hey all, Since Django 1.8 (currently in alpha state), model fields gained cardinality flags as part of the _meta refactoring. So, there is one_to_one, one_to_many, many_to_one and many_to_many. These flags are currently only used inside user-facing APIs such as forms and the admin. Furthermo