For those not familiar with the previous discussion on the subject:

http://groups.google.com/group/django-developers/browse_thread/thread/e7de5d07d614761a/e3147d2f93bcc804
http://groups.google.com/group/django-developers/browse_thread/thread/32f861c8bd5366a5/22732dc88e644f77


On Wed, May 26, 2010 at 10:32 AM, Michael P. Jung <mpj...@terreon.de> wrote:

> Some time ago I proposed a new field type called "CompositeField". It's
> basicly a way of doing composition in Django models.
>
> Its usage looks like:
>
>    class CoordField(CompositeField):
>        x = models.FloatField()
>        y = models.FloatField()
>
>    class Place(models.Model):
>        name = models.CharField(max_length=10)
>        coord = CoordField()
>
> And basicly creates this model:
>
>    class Place(models.Model):
>        name = models.CharField(max_length=10)
>        coord_x = models.FloatField()
>        coord_y = models.FloatField()
>
>
> Right now the code lives in a scrap heap repository, which is reused in
> many of the projects I work on. All the stuff is BSD licensed!
>
> https://hg.labs.terreon.de/common/chimes/
>
>
> It would be nice to get some feedback on this proposal and make it more
> useful to others. I would like to make a first class project out of it and
> add the possibility for composite fields to contain other composite fields.
> Admin integration would be awesome, but I've never really looked into that.
> The sub fields are normal model fields and can be accessed from queries and
> admin naturally.
>
>
> I'll join the sprints on thursday.
>
>
> --mp
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com<django-developers%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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.

Reply via email to