I just released django_polymorphic V1.0 beta on github and bitbucket.
The documentation is updated as well:
http://bserve.webhop.org/django_polymorphic/README.html
http://bserve.webhop.org/django_polymorphic/DOCS.html
Please see the changelog (it's also copied below):
http://bserve.webhop.org/django_polymorphic/CHANGES.html
The code:
GitHub:
http://github.com/bconstantin/django_polymorphic
Bitbucket:
http://bitbucket.org/bconstantin/django_polymorphic
Tar:
http://github.com/bconstantin/django_polymorphic/tarball/master
Kind Regards,
Bert Constantin
========================================================
This is a V1.0 Beta/Testing Release
-----------------------------------
This release is mostly a cleanup and maintenance release that also
improves a number of minor things and fixes one (non-critical) bug.
Some pending API changes and corrections have been folded into this
release
in order to make the upcoming V1.0 API as stable as possible.
This release is also about getting feedback from you in case you don't
approve of any of these changes or would like to get additional
API fixes into V1.0.
The release contains a considerable amount of changes in some of the
more
critical parts of the software. It's intended for testing and
development
environments and not for production environments. For these, it's best
to
wait a few weeks for the proper V1.0 release, to allow some time for
any
potential problems to turn up (if they exist).
If you encounter any such problems, please post them in the discussion
group
or open an issue on GitHub or BitBucket (or send me an email).
There also have been a number of minor API changes.
Please see the README for more information.
New Features
------------------------
* official Django 1.3 alpha compatibility
* ``PolymorphicModel.__getattribute__`` hack removed.
The python __getattribute__ hack generally causes a considerable
overhead and to have this in the performance-sensitive
PolymorphicModel
class was somewhat problematic. It's gone for good now.
* ``polymorphic_dumpdata`` management command functionality removed:
The regular Django dumpdata command now automatically works
correctly
for polymorphic models with all Django versions.
* .get_real_instances() has been elevated to an official part of the
API::
real_objects =
ModelA.objects.get_real_instances(base_objects_list_or_queryset)
allows you to turn a queryset or list of base objects into a list
of the real instances.
This is useful if e.g. you use ``ModelA.base_objects.extra(...)``
and then want to
transform the result to its polymorphic equivalent.
* ``translate_polymorphic_Q_object`` (see DOCS)
* improved testing
* Changelog added: CHANGES.rst/html
Bugfixes
------------------------
* removed requirement for primary key to be an IntegerField.
Thanks to Mathieu Steele and Malthe Borch.
API Changes
-----------
polymorphic_dumpdata
####################
The polymorphic_dumpdata management command is not needed anymore
and has been removed, as the regular Django dumpdata command now
automatically
works correctly with polymorphic models (for all supported versions of
Django).
Output of Queryset or Object Printing
#####################################
In order to improve compatibility with vanilla Django, printing
quersets does not use
django_polymorphic's pretty printing by default anymore.
To get the old behaviour when printing querysets, you need to replace
your model definition:
>>> class Project(PolymorphicModel):
by:
>>> class Project(PolymorphicModel, ShowFieldType):
The mixin classes for pretty output have been renamed:
``ShowFieldTypes, ShowFields, ShowFieldsAndTypes``
are now:
``ShowFieldType, ShowFieldContent and ShowFieldTypeAndContent``
(the old ones still exist for compatibility)
Running the Test suite with Django 1.3
######################################
Django 1.3 requires ``python manage.py test polymorphic`` instead of
just ``python manage.py test``.