On Sun, Jan 13, 2013 at 8:00 PM, Matt Barry <
matt.b...@gmail.com> wrote:
> Hi,
>
> I'm creating a model from an external database that has some encrypted
> columns. Initially I was thinking of creating a custom field type:
>
> class EncryptedField(models.Field):
> def db_type(self, connection):
> return 'TEXT'
> def pre_save(self, model, add):
> return encrypt(getattr(model, self.attname))
>
> ..but it doesn't seem there are any hooks to decrypt the data on the loading
> side. Am I missing anything, or is there a better way to do this sort of
> thing?
>
> Thanks,
> Matt
>