On Thu, May 12, 2011 at 12:41 PM, Michal Petrucha <michal.petru...@ksp.sk> wrote: > As most of you have probably noticed by now, in a week and a half I'll > start working on the implementation of composite fields. Before that > we should probably agree on the final form of the API. > > <snip>
Hi Michal This looks really, really good. A few comments: Value of a composite field: It should descend from namedtuple. From 1.4 onwards, Django only supports 2.5+, so it's not necessary to fudge things for Python 2.4 unique/unique_together: They should both be supported. unique_together should raise a PendingDeprecationWarning, and it should disappear according to the deprecation timeline. unique_together only exists as a Meta option as there is no field to attach that logic to - now there is. I also have a few questions: If a model has a composite field that is marked as primary_key=True, how will this affect instance.pk? Presumably this will now return a tuple - will this affect automatic URL generation in the admin? Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.