mailing list link
Meta classes should be before methods but after fields

This is a partial cherry-pick of b8046e88dc

Signed-off-by: Antoine Catton <acatton@fusionbox.com>
Ack-by: Antoine Catton <acatton@fusionbox.com>
Added StrDisplayNameMixin to many widgets.

StrDisplayNameMixin uses the __unicode__ or __str__ methods of the
widgets to create the display_name.  This is better than using a lambda
in the DisplayNameMixin because it forces the programmer to also write a
__str__ method for the model.

This is a partial cherry-pick of b8046e88dc

Signed-off-by: Antoine Catton <acatton@fusionbox.com>
Ack-by: Antoine Catton <acatton@fusionbox.com>
fix the tests on django 1.6

Any exception inside an ORM method (like those cause by our pre-delete
signal) invalidates the transaction. You need to use an atomic() to
prevent this.

Reviewed-by: Antoine Catton <acatton@fusionbox.com>
Fix multi-table inheritance with LinkFields

The fields LinkFields adds were getting added twice when inheriting from
a model with a LinkField. LinkField tries to prevent this by check if
the fields are already there, but it only checked local_fields. It needs
to check all model fields, including inherited fields.

164ea5f00b3db switched from using get_all_field_names to local_fields,
because get_all_field_names loads the appcache which can cause a
circular import. This commit uses get_fields_with_model, which does not
load the appcache, so it should be ok.
IE doesn't have window.scrollY

Use the recipe from
https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY instead.
use scrollBy instead of scrollTop+=

Setting scrollTop doesn't do anything in Firefox or IE, so use
window.scrollBy which is supported everywhere.