gintas/django-picklefield — pull request #3 by charettes (2012-02-02 22:08:06+00:00)
Title: Make sure objects such as `django.db.Model` subclasses can be pickled correctly and `callable` objectsrrectly and that `callable` objects can be wrapped to be retreived using the ORM.

Prior to this patch attempting to update a Model instance with a `PickledObjectField` referencing a `django.db.Model` subclass (or any object with the `prepare_database_save`) property raised a `TypeError` and there was no way to retreive a stored object that was `callable` since the ORM would try to filter on the actual return value of the object instead of the object instead (this is a desired and documented behavior to allow `Model.objects.filter(datetime_field__gte=datetime.now)` to work correctly and is especially usefull when defining `limit_choices_to`).