2010-2-04: support for annotate, aggregate and others, and bug fixes

5 views
Skip to first unread message

Bert Constantin

unread,
Feb 4, 2010, 12:02:43 PM2/4/10
to django-polymorphic
I just updated the repositories with the newest version of
django_polymorphic.

------------------------------------------------------------------
New features (and documentation)
------------------------------------------------------------------

queryset order_by method added

queryset aggregate() and extra() methods implemented

queryset annotate() method implemented

queryset values(), values_list(), distinct() documented; defer(),
only() allowed (but not yet supported)

setup.py added. Thanks to Andrew Ingram.

More about these additions in the docs:
http://bserve.webhop.org/wiki/django_polymorphic/doc

------------------------------------------------------------------
Bugfixes
------------------------------------------------------------------

fix remaining potential accessor name clashes (but this only works
with Django 1.2+, for 1.1 no changes). Thanks to Andrew Ingram.

fix use of 'id' model field, replaced with 'pk'.

fix select_related bug for objects from derived classes (till now
sel.-
r. was just ignored)

------------------------------------------------------------------
"Restrictions & Caveats" updated
------------------------------------------------------------------

* Django 1.1 only - the names of polymorphic models must be unique
in the whole project, even if they are in two different apps.
This results from a restriction in the Django 1.1 "related_name"
option (fixed in Django 1.2).

* Django 1.1 only - when ContentType is used in models, Django's
seralisation or fixtures cannot be used. This issue seems to be
resolved for Django 1.2 (changeset 11863: Fixed #7052, Added
support for natural keys in serialization).

------------------------------------------------------------------

Kind Regards,
Bert Constantin

Web: http://bserve.webhop.org/wiki/django_polymorphic
GitHub: http://github.com/bconstantin/django_polymorphic
Bitbucket: http://bitbucket.org/bconstantin/django_polymorphic
Tar: http://github.com/bconstantin/django_polymorphic/tarball/master

Reply all
Reply to author
Forward
0 new messages