initcrash/django-denorm — pull request #43 by Kronuz (2014-06-20 16:02:26+00:00)
Title: Commits to bugs I've found throughout the time

I've added commits to fix several issues I've come across throughout the time (each single commit is issolated, but some times depends in changes by previous commits):

* First, some PEP 8 cleanups.
* I beautified SQL for triggers, so they look better when printed by `denorm_sql`.
* Some actions in triggers were being duplicated (particularly when a single model had more than just one `@denormalize`).
* `denorm_always_skip` needs to be done at a later time, some times the model is a string (obviously without the `denorm_always_skip` attribute.
* The user should decide if the denormalized field is allowed to be null or not, and if it's blank and stuff.
* Fixed issue where objects ended up in `field_id` attributes.
* Fixed slef-referencing related models.
* Fix issue for some objects with custom named primary keys.
* Multi-table inheritance support.
* Missing `alias_map` attribute in query (for django 1.6 compatibility) added.
* Field names should all be quoted using the connection's `quote_name`. Fixed.
* Added `unique_together` to `DirtyInstance` model (also, `object_id` should never be null?)
* Added support for django's swappable models.

Most of the commits could probably be cherry picked... but I've found I need all of these.