Fixed #21499 -- Added a paragraph to the docs.
Fixed #21489 -- Make formsets directly importable from django.forms.
Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.

Updated ModelAdmin to use form.instance when passing parent model to
child inlines for add_view. There is effectively no change in the
change_view since the previously passed 'obj' is the same as form.instance.

Thanks to meshy for report, and EvilDMP and timo for review.
Fixed #21512 -- Added more complete information about Pillow and PIL in model_fields and model_forms tests.
Use str.isupper() to test if a string is uppercased.
Fixed #21355 -- try importing _imaging from PIL namespace first.
Fixed #21448 -- Fixed test client logout with cookie-based sessions

Thanks Gunnar Scherf for the report and the suggested patch.
Fixed a typo in the documentation
Replace use of dict.has_key with `key in dict`
Merge pull request #1985 from raphaa/21499

Fixed #21499 -- Migrations won't work if field signature changes
Fix squashed migration loading ordering issue
Change initial migration writing to work as docs suggest.

Application template now includes an empty migrations module, and
the autodetector will only make initial migrations for apps with
empty modules.
Add gis deconstruct() method (this does not make schema work)
PostGIS schema editor support
Field.deconstruct() howto docs
Fixed #21438: makemigrations now detects ManyToManyFields
Include deferred SQL in sqlmigrate output
Update tutorial part 1 to discuss migrations properly
Fixed #21169 -- Reworked RelatedManager methods use default filtering

The `remove()` and `clear()` methods of the related managers created by
`ForeignKey`, `GenericForeignKey`, and `ManyToManyField` suffered from a
number of issues. Some operations ran multiple data modifying queries without
wrapping them in a transaction, and some operations didn't respect default
filtering when it was present (i.e. when the default manager on the related
model implemented a custom `get_queryset()`).

Fixing the issues introduced some backward incompatible changes:

- The implementation of `remove()` for `ForeignKey` related managers changed
  from a series of `Model.save()` calls to a single `QuerySet.update()` call.
  The change means that `pre_save` and `post_save` signals aren't called anymore.

- The `remove()` and `clear()` methods for `GenericForeignKey` related
  managers now perform bulk delete so `Model.delete()` isn't called anymore.

- The `remove()` and `clear()` methods for `ManyToManyField` related
  managers perform nested queries when filtering is involved, which may
  or may not be an issue depending on the database and the data itself.

Refs. #3871, #21174.

Thanks Anssi Kääriäinen and Tim Graham for the reviews.
Used simpler queries for m2m clearing when possible.

Refs #21169