aino/django-hstore — pull request #2 by adieu (2012-06-23 08:48:44+00:00)
Title: Use signal and command to provide the same capability of the custom database backend

Current custom database backend does 3 things:

1. Call register_hstore for each connection.
2. Install hstore contrib for every database created.
3. Create index for hstore field.

This commit use connection_created to do the first two things. And sqlhstoreindexes command to do the third thing.

Plus this commit also fixed an issue when using south to add an hstore field with a default value.

There are two reasons I wanted to avoid using custom database backend:

1. Other django app might monkey patch the database backend from django to provide some features. Use a custom backend might lose those features.
2. If we have to write a custom backend when we add a new field type, next time when we add another field type we might have to write another backend. But in order to use those two field types simultaneously, we have to write a third backend to include both patches made by the first two. This don't sound very user friendly.

So I think it might be a good idea to provide the feature without using a custom backend.