PEP8 style fixes.
PEP8 style fixes.
Migrated registry to use django-polymorphic.

This replaces our previous custom solution with django-polymorphic
which supports more features. Some instances of cast() use still
need to be replaced.