Changelogs » Django-modelcluster

PyUp Safety actively tracks 362,670 Python packages for vulnerabilities and notifies you when to upgrade.



  * Implement `copy_cluster` method on ClusterableModel (Karl Hobley)
  * Add `formset_name` option on ClusterableModel formsets to allow the formset name to differ from the relation name (Matt Westcott)
  * Fix: Fix tests for Django 3.2 (Alex Tomkins, Matt Westcott, María Fernanda Magallanes)
  * Fix: Ensure ptr_id fields are correctly populated when deserialising models with multi-level inheritance (Alex Tomkins)


  * Allow child form class to be overridden in the `formsets` Meta property of ClusterForm (Helder Correia)
  * Add prefetch_related support to ParentalManyToManyField (Andy Chosak)
  * Implement `copy_child_relation` and `copy_all_child_relations` methods on ClusterableModel (Karl Hobley)
  * Fix: Fix behavior of ParentalKeys and prefetch_related() supplied with a lookup queryset (Juha Yrjölä)


  * Fix: Fix compatibility with django-taggit 1.3.0 (Martin Sandström)


  * Fix: ClusterForm without an explicit `formsets` kwarg now allows formsets to be omitted from form submissions, to fix regression with nested relations
  * Fix: ParentalManyToManyField data is now loaded correctly by ` loaddata` (Andy Babic)


  * Removed Python 2 and 3.4 support
  * Removed Django 1.10 and 1.11 support
  * Added django-taggit 1.x compatibility (Gassan Gousseinov, Matt Westcott)


  * Fix: ClusterForm without an explicit `formsets` kwarg now allows formsets to be omitted from form submissions, to fix regression with nested relations


  * Django 2.2 compatibility
  * Support nested child relationships in ClusterForm (Sam Costigan)


  * Added support for filter lookup expressions such as `__lt`


  * Django 2.1 compatibility
  * Python 3.7 compatibility
  * Implemented prefetch_related on FakeQuerySet (Haydn Greatnews)
  * Fix: Saving a ClusterableModel with a primary key of 0 no longer throws an IntegrityError (A Lee)
  * Fix: Serialization now respects `serialize=False` on ParentalManyToManyFields (Tadas Dailyda)


  * `on_delete` on ParentalKey now defaults to CASCADE if not specified


  * Django 2.0 compatibility
  * Removed Django 1.8 and 1.9 support
  * Child formsets now validate uniqueness constraints
  * Fix: Many-to-many relations inside inline formsets are now saved correctly


  * Django 1.11 compatibility
  * Python 3.6 compatibility
  * Added the ability to install the optional dependency `django-taggit`
  using `pip install django-modelcluster[taggit]`
  * Fix: now correctly writes ParentalManyToManyField relations back to the database rather than requiring a separate step
  * Fix: ClusterForm.is_multipart() now returns True when a child form requires multipart submission
  * Fix: now includes media defined on child forms
  * Fix: ParentalManyToManyField.value_from_object now returns correct result on unsaved objects


  * Fix: Added _result_cache property on FakeQuerySet (necessary for model forms with ParentalManyToManyFields to work correctly on Django 1.8-1.9)


  * Added support for many-to-many relations (Thejaswi Puthraya, Matt Westcott)
  * Added compatibility with django-taggit 0.20 and dropped support for earlier versions
  * Deprecated the Model._meta.child_relations property (get_all_child_relations should be used instead)
  * Implemented the `set()` method on related managers (introduced in Django 1.9)


  * Removed Django 1.7 and Python 3.2 support
  * Added system check to disallow related_name='+' on ParentalKey
  * Added support for TAGGIT_CASE_INSENSITIVE on ClusterTaggableManager
  * Field values for serialization are now fetched via pre_save (which, in particular, ensures that file fields are committed to storage)
  * Fix: System checks now correctly report a model name that cannot be resolved to a model
  * Fix: prefetch_related on a ClusterTaggableManager no longer fails (but doesn't prefetch either)
  * Fix: Adding invalid types as tags now correctly reports a ValueError


  * Django 1.9 compatibility
  * Added exclude() method to FakeQuerySet
  * Removed dependency on the 'six' package, in favour of Django's built-in version


  * Removed Django 1.6 and Python 2.6 support
  * Added system check to ensure that ParentalKey points to a ClusterableModel
  * Added validate_max, min_num and validate_min parameters to childformset_factory


  * Fix: Updated add_ignored_fields declaration so that South / Django 1.6 correctly ignores modelcluster.contrib.taggit.ClusterTaggableManager again


  * Django 1.8 compatibility
  * 'modelcluster.tags' module has been moved to 'modelcluster.contrib.taggit'


  (withdrawn due to packaging issues)


  * ClusterForm.Meta formsets can now be specified as a dict to allow extra properties to be set on the underlying form.
  * Added order_by() method to FakeQuerySet
  * Fix: Child object ordering is now applied without needing to save to the database


  * Django 1.7 compatibility
  * Fix: Datetimes are converted to UTC on serialisation and to local time on deserialisation, to match Django's behaviour when accessing the database
  * Fix: ParentalKey relations to a model's superclass are now picked up correctly by that model
  * Fix: Custom Media classes on ClusterForm now behave correctly


  * Added exists(), first() and last() methods on FakeQuerySet
  * Fix: Model ordering is applied when adding items to DeferringRelatedManager


  * Python 2.6 compatibility
  * Python 3 compatibility
  * Django 1.7 beta compatibility
  * Added support for prefetch_related on DeferringRelatedManager


  * Initial release.