ambitioninc/django-entity-history — pull request #1 by wesleykendall (2014-10-04 21:38:38+00:00)
Title: Django Entity History

@Wilduck @robdmc This is the first version of the django entity history app. A brief summary of the additions:

* EntityActivationHistory and EntityRelationshipActivationHistory models were added that track when entities or relationships are activated/deactivated
* Postgres triggers are installed in a data migration that track when entities and relationships are changed
* Two functions are provided - get_entities_at_time and get_sub_entities_at_times. These functions obtain entities or sub entities that were present at the provided times

Future plans - I have already made a proxy model called EntityHistory. I'd like to make the objects of this proxy model point to a custom model manager. The model manager will utilize the functions that I have already created and add historical functions on top of entity model manager functions. For example:

```
EntityHistory.objects.filter(entity_kind__name='entity').sub_entities_at_times([super_entities], [times])
```

That function would get all of the sub entities at the provided times and only return entities that match the filtering criteria that is already present on the queryset. The same can be done for obtaining active entities.

I went ahead and made basic documentation, but I wanted some comments before proceeding forward with this.